Save This Page
Home » webwork-2.2.7 » com.opensymphony.webwork.dispatcher » [javadoc | source]
com.opensymphony.webwork.dispatcher
public class: DispatcherUtils [javadoc | source]
java.lang.Object
   com.opensymphony.webwork.dispatcher.DispatcherUtils
A utility class whereby FilterDispatcher delegate most of its tasks to. A static singleton that gets initlialized upon the call to it's initalize(ServletContext) method
Nested Class Summary:
public class  DispatcherUtils.Locator  Simple accessor for a static method 
Field Summary
protected  boolean devMode     
protected  boolean paramsWorkaroundEnabled     
Constructor:
 protected DispatcherUtils(ServletContext servletContext) 
Method from com.opensymphony.webwork.dispatcher.DispatcherUtils Summary:
cleanup,   createContextMap,   createContextMap,   getInstance,   getMaxSize,   getSaveDir,   init,   initialize,   isPortletSupportActive,   prepare,   sendError,   serviceAction,   setInstance,   setPortletSupportActive,   wrapRequest
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.webwork.dispatcher.DispatcherUtils Detail:
 public  void cleanup() 
 public Map createContextMap(HttpServletRequest request,
    HttpServletResponse response,
    ActionMapping mapping,
    ServletContext context) 
 public HashMap createContextMap(Map requestMap,
    Map parameterMap,
    Map sessionMap,
    Map applicationMap,
    HttpServletRequest request,
    HttpServletResponse response,
    ServletContext servletContext) 
    Merges all application and servlet attributes into a single HashMap to represent the entire Action context.
 public static DispatcherUtils getInstance() 
 public static int getMaxSize() 
    Returns the maximum upload size allowed for multipart requests (this is configurable).
 public String getSaveDir(ServletContext servletContext) 
    Returns the path to save uploaded files to (this is configurable).
 protected  void init(ServletContext servletContext) 
 public static  void initialize(ServletContext servletContext) 
 public static boolean isPortletSupportActive() 
    Returns true, if portlet support is active, false otherwise.
 public  void prepare(HttpServletRequest request,
    HttpServletResponse response) 
 public  void sendError(HttpServletRequest request,
    HttpServletResponse response,
    ServletContext ctx,
    int code,
    Exception e) 
    Sends an HTTP error response code.
 public  void serviceAction(HttpServletRequest request,
    HttpServletResponse response,
    ServletContext context,
    ActionMapping mapping) throws ServletException 
    Loads the action and executes it. This method first creates the action context from the given parameters then loads an ActionProxy from the given action name and namespace. After that, the action is executed and output channels throught the response object. Actions not found are sent back to the user via the DispatcherUtils#sendError method, using the 404 return code. All other errors are reported by throwing a ServletException.
 public static  void setInstance(DispatcherUtils instance) 
 public static  void setPortletSupportActive(boolean portletSupportActive) 
    Set the flag that portlet support is active or not.
 public HttpServletRequest wrapRequest(HttpServletRequest request,
    ServletContext servletContext) throws IOException 
    Wraps and returns the given response or returns the original response object. This is used to transparently handle multipart data as a wrapped class around the given request. Override this method to handle multipart requests in a special way or to handle other types of requests. Note, com.opensymphony.webwork.dispatcher.multipart.MultiPartRequestWrapper is flexible - you should look to that first before overriding this method to handle multipart data.