| java.lang.Object com.opensymphony.webwork.dispatcher.DispatcherUtils
DispatcherUtils | public class DispatcherUtils (Code) | | 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
author: patrick author: Rainer Hermanns author: tm_jee version: $Date: 2007-06-11 16:53:47 +0200 (Mon, 11 Jun 2007) $ $Id: DispatcherUtils.java 2920 2007-06-11 14:53:47Z tm_jee $ See Also: com.opensymphony.webwork.dispatcher.FilterDispatcher |
Inner Class :public class Locator | |
Method Summary | |
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.
Parameters: requestMap - a Map of all request attributes. Parameters: parameterMap - a Map of all request parameters. Parameters: sessionMap - a Map of all session attributes. Parameters: applicationMap - a Map of all servlet context attributes. Parameters: request - the HttpServletRequest object. Parameters: response - the HttpServletResponse object. Parameters: servletContext - the ServletContext object. | 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) Loads the action and executes it. | 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) Wraps and returns the given response or returns the original response object. |
devMode | protected boolean devMode(Code) | | |
paramsWorkaroundEnabled | protected boolean paramsWorkaroundEnabled(Code) | | |
cleanup | public void cleanup()(Code) | | |
createContextMap | public HashMap createContextMap(Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code) | | Merges all application and servlet attributes into a single HashMap to represent the entire
Action context.
Parameters: requestMap - a Map of all request attributes. Parameters: parameterMap - a Map of all request parameters. Parameters: sessionMap - a Map of all session attributes. Parameters: applicationMap - a Map of all servlet context attributes. Parameters: request - the HttpServletRequest object. Parameters: response - the HttpServletResponse object. Parameters: servletContext - the ServletContext object. a HashMap representing the Action context. |
getMaxSize | public static int getMaxSize()(Code) | | Returns the maximum upload size allowed for multipart requests (this is configurable).
the maximum upload size allowed for multipart requests |
getSaveDir | public String getSaveDir(ServletContext servletContext)(Code) | | Returns the path to save uploaded files to (this is configurable).
the path to save uploaded files to |
isPortletSupportActive | public static boolean isPortletSupportActive()(Code) | | Returns true, if portlet support is active, false otherwise.
true, if portlet support is active, false otherwise. |
serviceAction | public void serviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, ActionMapping mapping) throws ServletException(Code) | | 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.
Parameters: request - the HttpServletRequest object Parameters: response - the HttpServletResponse object Parameters: mapping - the action mapping object throws: ServletException - when an unknown error occurs (not a 404, but typically something thatwould end up as a 5xx by the servlet container) |
setPortletSupportActive | public static void setPortletSupportActive(boolean portletSupportActive)(Code) | | Set the flag that portlet support is active or not.
Parameters: portletSupportActive - true or false |
|
|