|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object servletunit.struts.Common
Contains code common to both MockStrutsTestCase and CactusStrutsTestCase. It's always good to get rid of redundancy!
Field Summary | |
protected static java.lang.String |
INCLUDE_SERVLET_PATH
|
protected static Log |
logger
|
Constructor Summary | |
Common()
|
Method Summary | |
protected static ForwardConfig |
findForward(java.lang.String mappingName,
java.lang.String forwardName,
HttpServletRequest request,
ServletContext context)
Returns a ForwardConfig for the given forward name. |
protected static ActionConfig |
getActionConfig(java.lang.String mappingName,
HttpServletRequest request,
ServletContext context)
Returns the configuration for the given action mapping. |
protected static ActionForm |
getActionForm(java.lang.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(java.lang.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,
java.lang.String actionPath,
ServletContext context)
Sets an ActionForm instance in the request. |
protected static java.lang.String |
stripActionPath(java.lang.String path)
Strips off *.do from action paths specified as such. |
protected static java.lang.String |
stripJSessionID(java.lang.String path)
Strip ;jsessionid= |
protected static void |
verifyActionMessages(HttpServletRequest request,
java.lang.String[] messageNames,
java.lang.String key,
java.lang.String messageLabel)
Common method to verify action errors and action messages. |
protected static void |
verifyForwardPath(java.lang.String actionPath,
java.lang.String forwardName,
java.lang.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,
java.lang.String key,
java.lang.String messageLabel)
Common method to verify action errors and action messages. |
protected static void |
verifyTilesForward(java.lang.String actionPath,
java.lang.String forwardName,
java.lang.String expectedDefinition,
boolean isInputPath,
HttpServletRequest request,
ServletContext context,
ServletConfig config)
Verifies that ActionServlet used this logical forward or input mapping with this tile definition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String INCLUDE_SERVLET_PATH
protected static Log logger
Constructor Detail |
public Common()
Method Detail |
protected static void verifyNoActionMessages(HttpServletRequest request, java.lang.String key, java.lang.String messageLabel)
protected static void verifyActionMessages(HttpServletRequest request, java.lang.String[] messageNames, java.lang.String key, java.lang.String messageLabel)
protected static ComponentDefinition getTilesForward(java.lang.String forwardPath, HttpServletRequest request, ServletContext context, ServletConfig config)
protected static void verifyTilesForward(java.lang.String actionPath, java.lang.String forwardName, java.lang.String expectedDefinition, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config)
junit.framework.AssertionFailedError
- if the expected and actual tiles definitions do not match.protected static void verifyForwardPath(java.lang.String actionPath, java.lang.String forwardName, java.lang.String actualForwardPath, boolean isInputPath, HttpServletRequest request, ServletContext context, ServletConfig config)
junit.framework.AssertionFailedError
- if expected and actual paths do not match.protected static java.lang.String stripActionPath(java.lang.String path)
protected static java.lang.String stripJSessionID(java.lang.String path)
protected static ActionForm getActionForm(java.lang.String actionPath, HttpServletRequest request, ServletContext context)
protected static ForwardConfig findForward(java.lang.String mappingName, java.lang.String forwardName, HttpServletRequest request, ServletContext context)
protected static ActionConfig getActionConfig(java.lang.String mappingName, HttpServletRequest request, ServletContext context)
protected static ModuleConfig getModuleConfig(HttpServletRequest request, ServletContext context)
protected static void setActionForm(ActionForm form, HttpServletRequest request, java.lang.String actionPath, ServletContext context)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |