Refine search
String mimetype = container.getFormatRegistry().getMimeType(req.getAgent(), template.getFormat()); if (mimetype == null) logger.debug("Force success status header in response: " + req.forceSuccessStatus()); logger.debug("Sending status " + statusCode + " (Template: " + template.getPath() + ")"); logger.debug("Rendering response: content type=" + mimetype); res.reset(); res.setCache(cache); res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode); String location = status.getLocation(); if (location != null && location.length() > 0) res.setHeader(WebScriptResponse.HEADER_LOCATION, location); res.setContentType(mimetype + ";charset=UTF-8"); renderTemplate(template.getPath(), model, res.getWriter());
buf.append(req.getContextPath()); if (!arg.startsWith("/") && !req.getContextPath().endsWith("/")) buf.append(res.encodeResourceUrl(arg));
buf.append(req.getServicePath()); if (arg.length() > 0) buf.append("guest=" + (req.isGuest() ? "true" : "")); if (req.getFormatStyle() == FormatStyle.argument) result = res.encodeScriptUrl(buf.toString());
res.setContentType(Format.JAVASCRIPT.mimetype() + ";charset=UTF-8"); res.setCache(cache); String locale = req.getParameter("locale"); if (locale == null || locale.length() == 0) res.getWriter().write(result); res.getWriter().flush(); res.getWriter().close();
final public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException String format = req.getFormat(); String mimetype = getContainer().getFormatRegistry().getMimeType(req.getAgent(), format); if (mimetype == null) ScriptDetails script = getExecuteScript(req.getContentType()); if (script != null) logger.debug("Setting status " + statusCode); res.setStatus(statusCode); res.setHeader(WebScriptResponse.HEADER_LOCATION, location); res.setCache(cache); res.setContentType(Format.JAVASCRIPT.mimetype() + ";charset=UTF-8"); res.getWriter().write((callback + "(")); logger.debug("Rendering response: content type=" + mimetype + ", status=" + statusCode); res.setContentType(mimetype + ";charset=UTF-8"); renderFormatTemplate(format, templateModel, res.getWriter()); res.getWriter().write(")");
if (debug) logger.debug("Agent: " + scriptReq.getAgent()); String reqFormat = scriptReq.getFormat(); String format = (reqFormat == null || reqFormat.length() == 0) ? "[undefined]" : reqFormat; Description desc = scriptReq.getServiceMatch().getWebScript().getDescription(); logger.debug("Invoking Web Script " + description.getId() + " (format " + format + ", style: " + desc.getFormatStyle() + ", default: " + desc.getDefaultFormat() + ")"); res.setCache(cache); res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode); res.setContentType(mimetype + ";charset=UTF-8"); try statusProcessor.process(validTemplatePath, statusModel, res.getWriter());
StatusTemplate statusTemplate = null; Map<String, Object> statusModel = null; String format = request.getFormat(); String mimetype = container.getFormatRegistry().getMimeType(request.getAgent(), statusTemplate.getFormat()); if (mimetype == null) logger.debug("Force success status header in response: " + request.forceSuccessStatus()); logger.debug("Sending status " + statusCode + " (Template: " + statusTemplate.getPath() + ")"); logger.debug("Rendering response: content type=" + mimetype); response.setStatus(request.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode); response.setContentType(mimetype + ";charset=UTF-8"); statusProcessor.process(validTemplatePath, statusModel, response.getWriter());
if (debug) logger.debug("Agent: " + scriptReq.getAgent()); String reqFormat = scriptReq.getFormat(); String format = (reqFormat == null || reqFormat.length() == 0) ? "[undefined]" : reqFormat; Description desc = scriptReq.getServiceMatch().getWebScript().getDescription(); logger.debug("Invoking Web Script " + description.getId() + " (format " + format + ", style: " + desc.getFormatStyle() + ", default: " + desc.getDefaultFormat() + ")"); res.setCache(cache);
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException String scriptId = req.getExtensionPath(); if (scriptId == null || scriptId.length() == 0) OutputStream out = res.getOutputStream(); res.setContentType(Format.XML.mimetype() + ";charset=UTF-8"); byte[] buffer = new byte[2048]; int read = serviceDescIS.read(buffer);
closeExtensibilityModel(extModel, scriptRes.getWriter());
/** * @see freemarker.template.TemplateMethodModel#exec(java.util.List) */ public Object exec(List args) throws TemplateModelException { String result = ""; if (args.size() != 0) { Object arg0 = args.get(0); if (arg0 instanceof TemplateScalarModel) { String arg = ((TemplateScalarModel)arg0).getAsString(); result = res.getEncodeResourceUrlFunction(arg); } } return result; } }
/** * @see freemarker.template.TemplateMethodModel#exec(java.util.List) */ public Object exec(List args) throws TemplateModelException { String result = ""; if (args.size() != 0) { Object arg0 = args.get(0); if (arg0 instanceof TemplateScalarModel) { String arg = ((TemplateScalarModel)arg0).getAsString(); result = res.getEncodeScriptUrlFunction(arg); } } return result; } }
final public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException String format = req.getFormat(); String mimetype = getContainer().getFormatRegistry().getMimeType(req.getAgent(), format); if (mimetype == null) ScriptDetails script = getExecuteScript(req.getContentType()); if (script != null) logger.debug("Setting status " + statusCode); res.setStatus(statusCode); res.setHeader(WebScriptResponse.HEADER_LOCATION, location); res.setCache(cache); res.setContentType(Format.JAVASCRIPT.mimetype() + ";charset=UTF-8"); res.getWriter().write((callback + "(")); logger.debug("Rendering response: content type=" + mimetype + ", status=" + statusCode); res.setContentType(mimetype + ";charset=UTF-8"); renderFormatTemplate(format, templateModel, res.getWriter()); res.getWriter().write(")");
if (debug) logger.debug("Agent: " + scriptReq.getAgent()); String reqFormat = scriptReq.getFormat(); String format = (reqFormat == null || reqFormat.length() == 0) ? "[undefined]" : reqFormat; Description desc = scriptReq.getServiceMatch().getWebScript().getDescription(); logger.debug("Invoking Web Script " + description.getId() + " (format " + format + ", style: " + desc.getFormatStyle() + ", default: " + desc.getDefaultFormat() + ")"); res.setCache(cache); res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode); res.setContentType(mimetype + ";charset=UTF-8"); try statusProcessor.process(validTemplatePath, statusModel, res.getWriter());
res.setContentType(Format.JAVASCRIPT.mimetype() + ";charset=UTF-8"); res.setCache(cache); String locale = req.getParameter("locale"); if (locale == null || locale.length() == 0) res.getWriter().write(result); res.getWriter().flush(); res.getWriter().close();
closeExtensibilityModel(extModel, scriptRes.getWriter());
/** * @see freemarker.template.TemplateMethodModel#exec(java.util.List) */ public Object exec(List args) throws TemplateModelException { String result = ""; if (args.size() != 0) { Object arg0 = args.get(0); if (arg0 instanceof TemplateScalarModel) { String arg = ((TemplateScalarModel)arg0).getAsString(); result = res.getEncodeResourceUrlFunction(arg); } } return result; } }
/** * @see freemarker.template.TemplateMethodModel#exec(java.util.List) */ public Object exec(List args) throws TemplateModelException { String result = ""; if (args.size() != 0) { Object arg0 = args.get(0); if (arg0 instanceof TemplateScalarModel) { String arg = ((TemplateScalarModel)arg0).getAsString(); result = res.getEncodeScriptUrlFunction(arg); } } return result; } }
final public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException String format = req.getFormat(); String mimetype = getContainer().getFormatRegistry().getMimeType(req.getAgent(), format); if (mimetype == null) ScriptDetails script = getExecuteScript(req.getContentType()); if (script != null) logger.debug("Setting status " + statusCode); res.setStatus(statusCode); res.setHeader(WebScriptResponse.HEADER_LOCATION, location); res.setCache(cache); res.setContentType(Format.JAVASCRIPT.mimetype() + ";charset=UTF-8"); res.getWriter().write((callback + "(")); logger.debug("Rendering response: content type=" + mimetype + ", status=" + statusCode); res.setContentType(mimetype + ";charset=UTF-8"); renderFormatTemplate(format, templateModel, res.getWriter()); res.getWriter().write(")");
String mimetype = container.getFormatRegistry().getMimeType(req.getAgent(), template.getFormat()); if (mimetype == null) logger.debug("Force success status header in response: " + req.forceSuccessStatus()); logger.debug("Sending status " + statusCode + " (Template: " + template.getPath() + ")"); logger.debug("Rendering response: content type=" + mimetype); res.reset(); res.setCache(cache); res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode); String location = status.getLocation(); if (location != null && location.length() > 0) res.setHeader(WebScriptResponse.HEADER_LOCATION, location); res.setContentType(mimetype + ";charset=UTF-8"); renderTemplate(template.getPath(), model, res.getWriter());