@Override protected HttpServletRequest getHttpServletRequest() { return ServletActionContext.getRequest(); } }
public ServletContext getServletContext() { if (servletContext != null) return servletContext; else return ServletActionContext.getServletContext(); }
public void deleteData(int i, int i1) throws DOMException { throw new WebWorkException("Operation not supported"); }
@Override protected HttpServletResponse getHttpServletResponse() { return ServletActionContext.getResponse(); }
/** * This method is called from {@link #doExecute(String, ActionInvocation)} * to obtain the FreeMarker configuration object that this result will use * for template loading. This is a hook that allows you to custom-configure * the configuration object in a subclass, or to fetch it from an IoC * container. <p/><b>The default implementation obtains the configuration * from the ConfigurationManager instance. </b> */ protected Configuration getConfiguration() throws TemplateException { return FreemarkerManager.getInstance().getConfiguration( ServletActionContext.getServletContext()); }
@Override protected ServletConfig getServletConfig() { return ServletActionContext.getServletConfig(); }
public static String getResourceBase(HttpServletRequest req) { String path = RequestUtils.getServletPath(req); if (path == null || "".equals(path)) { return ""; } return path.substring(0, path.lastIndexOf('/')); } }
public String execute() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); String requestedUrl = request.getPathInfo(); if (successResultValue == null) successResultValue = requestedUrl; return SUCCESS; }
/** * The default writer writes directly to the response writer. */ protected Writer getWriter() throws IOException { return ServletActionContext.getResponse().getWriter(); }
public Text splitText(int i) throws DOMException { throw new WebWorkException("Operation not supported"); }
protected String getBaseUrl() { HttpServletRequest req = ServletActionContext.getRequest(); return req.getScheme() + "://" + req.getServerName() + ( req.getServerPort() == 80 ? "" : ":" + req.getServerPort() ) + req.getContextPath(); } }
public void setData(String string) throws DOMException { throw new WebWorkException("Operation not supported"); }
public String execute() throws Exception { // Init if (hasErrors()) return ERROR; // Begin if (ServletActionContext.getRequest() instanceof MultiPartRequestWrapper) { return handleUploadedFile((MultiPartRequestWrapper) ServletActionContext.getRequest()); } else { return ERROR; } }
public void appendData(String string) throws DOMException { throw new WebWorkException("Operation not supported"); }
public void replaceData(int i, int i1, String string) throws DOMException { throw new WebWorkException("Operation not supported"); }
protected WebWorkException operationNotSupported() { return new WebWorkException("Operation not supported."); }
protected void unknownCommand(String command, String virtualFolderPath, String type, String filename, String contentType, java.io.File newFile) { throw new WebWorkException("unknown command "+command); }
public void insertData(int i, String string) throws DOMException { throw new WebWorkException("Operation not supported"); }
protected void checkParams() { if (dynamicReport == null) { final String message = "No dynamicReport specified..."; LOG.error(message); throw new WebWorkException(message); } //Some reports may not need specifically a datasource if (dataSource == null) { final String message = "No dataSource specified..."; LOG.debug(message); } }
protected void checkParams() { if (dynamicReport == null) { final String message = "No dynamicReport specified..."; LOG.error(message); throw new WebWorkException(message); } //Some reports may not need specifically a datasource if (dataSource == null) { final String message = "No dataSource specified..."; LOG.debug(message); } }