/** * @see org.springframework.extensions.webscripts.AbstractRuntime#beforeProcessError(org.springframework.extensions.webscripts.Match, java.lang.Throwable) * * Override this hook to add special handling for "missing" WebScript components. * The page renderer can safely ignore components that no longer map to a URL. It * is recommended that that the debug flag is used to view missing webscript URLs. */ @Override protected boolean beforeProcessError(Match match, Throwable e) { if (e instanceof WebScriptException && ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND) { // log info on server if we are debugging if (logger.isDebugEnabled()) { logger.debug(e.getMessage()); } return false; } else { return super.beforeProcessError(match, e); } } }
public WebScriptSession getSession() { if (session == null) { session = new RuntimeSession(createSessionFactory()); } return session; }
final String method = getScriptMethod(); String scriptUrl = null; Match match = null; scriptUrl = getScriptUrl(); if (scriptUrl == null || scriptUrl.length() == 0) logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Processing script url (" + method + ") " + scriptUrl); scriptReq = createRequest(null); scriptRes = createResponse(); auth = createAuthenticator(); logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Container requires pre-auth: "+containerRequiredAuth); scriptReq = createRequest(match); scriptRes = createResponse(); auth = createAuthenticator(); executeScript(scriptReq, scriptRes, auth); if (beforeProcessError(match, e)) WebScriptRequest req = createRequest(match); WebScriptResponse res = createResponse(); String format = req.getFormat(); statusTemplate = getStatusCodeTemplate(statusCode);
final String method = getScriptMethod(); String scriptUrl = null; Match match = null; scriptUrl = getScriptUrl(); if (scriptUrl == null || scriptUrl.length() == 0) logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Processing script url (" + method + ") " + scriptUrl); scriptReq = createRequest(null); scriptRes = createResponse(); auth = createAuthenticator(); logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Container requires pre-auth: "+containerRequiredAuth); scriptReq = createRequest(match); scriptRes = createResponse(); auth = createAuthenticator(); executeScript(scriptReq, scriptRes, auth); if (beforeProcessError(match, e)) WebScriptRequest req = createRequest(match); WebScriptResponse res = createResponse(); renderErrorResponse(match, e, req, res);
statusTemplate = getStatusCodeTemplate(statusCode); statusTemplate = getFormatStatusTemplate(format); validTemplatePath = container.getTemplateProcessorRegistry().findValidTemplatePath(statusTemplate.getPath()); statusTemplate = getStatusTemplate(); validTemplatePath = container.getTemplateProcessorRegistry().findValidTemplatePath(statusTemplate.getPath()); statusModel.put("url", createURLModel(request)); if (match != null && match.getWebScript() != null)
@Override protected void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Set Portlet title based on Web Script WebScript script = scriptReq.getServiceMatch().getWebScript(); Description desc = script.getDescription(); res.setTitle(desc.getShortName()); // Note: Do not render script if portlet window is minimized if (!WindowState.MINIMIZED.equals(req.getWindowState())) { super.executeScript(scriptReq, scriptRes, auth); } }
final String method = getScriptMethod(); String scriptUrl = null; Match match = null; scriptUrl = getScriptUrl(); if (scriptUrl == null || scriptUrl.length() == 0) logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Processing script url (" + method + ") " + scriptUrl); scriptReq = createRequest(null); scriptRes = createResponse(); auth = createAuthenticator(); logger.debug("(Runtime=" + getName() + ", Container=" + container.getName() + ") Container requires pre-auth: "+containerRequiredAuth); scriptReq = createRequest(match); scriptRes = createResponse(); auth = createAuthenticator(); executeScript(scriptReq, scriptRes, auth); if (beforeProcessError(match, e)) WebScriptRequest req = createRequest(match); WebScriptResponse res = createResponse(); String format = req.getFormat(); statusTemplate = getStatusCodeTemplate(statusCode);
@Override protected void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Set Portlet title based on Web Script WebScript script = scriptReq.getServiceMatch().getWebScript(); Description desc = script.getDescription(); res.setTitle(desc.getShortName()); // Note: Do not render script if portlet window is minimized if (!WindowState.MINIMIZED.equals(req.getWindowState())) { super.executeScript(scriptReq, scriptRes, auth); } }
@Override protected void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Set Portlet title based on Web Script WebScript script = scriptReq.getServiceMatch().getWebScript(); Description desc = script.getDescription(); res.setTitle(desc.getShortName()); // Note: Do not render script if portlet window is minimized if (!WindowState.MINIMIZED.equals(req.getWindowState())) { super.executeScript(scriptReq, scriptRes, auth); } }
/** * @see org.springframework.extensions.webscripts.AbstractRuntime#beforeProcessError(org.springframework.extensions.webscripts.Match, java.lang.Throwable) * * Override this hook to add special handling for "missing" WebScript components. * The page renderer can safely ignore components that no longer map to a URL. It * is recommended that that the debug flag is used to view missing webscript URLs. */ @Override protected boolean beforeProcessError(Match match, Throwable e) { if (e instanceof WebScriptException && ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND) { // log info on server if we are debugging if (logger.isDebugEnabled()) { logger.debug(e.getMessage()); } return false; } else { return super.beforeProcessError(match, e); } } }
public WebScriptSession getSession() { if (session == null) { session = new RuntimeSession(createSessionFactory()); } return session; }
runtime.executeScript(); return new MockHttpServletResponseResponse(res);
public WebScriptSession getSession() { if (session == null) { session = new RuntimeSession(createSessionFactory()); } return session; }