| java.lang.Object servletunit.struts.Common
Common | public class Common (Code) | | Contains code common to both MockStrutsTestCase and CactusStrutsTestCase.
It's always good to get rid of redundancy!
|
Method Summary | |
protected static ForwardConfig | findForward(String mappingName, String forwardName, HttpServletRequest request, ServletContext context) Returns a ForwardConfig for the given forward name. | protected static ActionConfig | getActionConfig(String mappingName, HttpServletRequest request, ServletContext context) Returns the configuration for the given action mapping. | protected static ActionForm | getActionForm(String actionPath, HttpServletRequest request, ServletContext context) Returns any ActionForm instance stored in the request or session, if available. | protected static ModuleConfig | getModuleConfig(HttpServletRequest request, ServletContext context) Returns the configuration for the current module. | protected static ComponentDefinition | getTilesForward(String forwardPath, HttpServletRequest request, ServletContext context, ServletConfig config) Retrieves a forward uri for tile - this is required for applications
using the tiles framework, since the actual forward URI must
be fetched from the tile definition. | protected static void | setActionForm(ActionForm form, HttpServletRequest request, String actionPath, ServletContext context) Sets an ActionForm instance in the request. | protected static String | stripActionPath(String path) Strips off *.do from action paths specified as such. | protected static String | stripJSessionID(String path) Strip ;jsessionid= from path. | protected static void | verifyActionMessages(HttpServletRequest request, String[] messageNames, String key, String messageLabel) Common method to verify action errors and action messages. | protected static void | verifyForwardPath(String actionPath, String forwardName, String actualForwardPath, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config) Verifies that ActionServlet used this logical forward or input mapping. | protected static void | verifyNoActionMessages(HttpServletRequest request, String key, String messageLabel) Common method to verify action errors and action messages. | protected static void | verifyTilesForward(String actionPath, String forwardName, String expectedDefinition, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config) Verifies that ActionServlet used this logical forward or input mapping with this tile definition. |
INCLUDE_SERVLET_PATH | final protected static String INCLUDE_SERVLET_PATH(Code) | | |
logger | protected static Log logger(Code) | | |
findForward | protected static ForwardConfig findForward(String mappingName, String forwardName, HttpServletRequest request, ServletContext context)(Code) | | Returns a ForwardConfig for the given forward name. This method first searches for the forward in the supplied
action mapping. If it is not defined there, or if the mapping is not provided, it searches for it globally.
|
getTilesForward | protected static ComponentDefinition getTilesForward(String forwardPath, HttpServletRequest request, ServletContext context, ServletConfig config)(Code) | | Retrieves a forward uri for tile - this is required for applications
using the tiles framework, since the actual forward URI must
be fetched from the tile definition.
|
stripActionPath | protected static String stripActionPath(String path)(Code) | | Strips off *.do from action paths specified as such.
|
stripJSessionID | protected static String stripJSessionID(String path)(Code) | | Strip ;jsessionid= from path.
stripped path |
verifyActionMessages | protected static void verifyActionMessages(HttpServletRequest request, String[] messageNames, String key, String messageLabel)(Code) | | Common method to verify action errors and action messages.
|
verifyForwardPath | protected static void verifyForwardPath(String actionPath, String forwardName, String actualForwardPath, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config)(Code) | | Verifies that ActionServlet used this logical forward or input mapping.
throws: AssertionFailedError - if expected and actual paths do not match. |
verifyNoActionMessages | protected static void verifyNoActionMessages(HttpServletRequest request, String key, String messageLabel)(Code) | | Common method to verify action errors and action messages.
|
verifyTilesForward | protected static void verifyTilesForward(String actionPath, String forwardName, String expectedDefinition, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config)(Code) | | Verifies that ActionServlet used this logical forward or input mapping with this tile definition.
throws: AssertionFailedError - if the expected and actual tiles definitions do not match. |
|
|