|
|||||||||
| Home >> All >> servletunit >> [ struts overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
servletunit.struts
Class Common

java.lang.Objectservletunit.struts.Common
- public class Common
- extends java.lang.Object
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 org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
Common()
|
|
| Method Summary | |
protected static org.apache.struts.config.ForwardConfig |
findForward(java.lang.String mappingName,
java.lang.String forwardName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Returns a ForwardConfig for the given forward name. |
protected static org.apache.struts.config.ActionConfig |
getActionConfig(java.lang.String mappingName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Returns the configuration for the given action mapping. |
protected static org.apache.struts.action.ActionForm |
getActionForm(java.lang.String actionPath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Returns any ActionForm instance stored in the request or session, if available. |
protected static org.apache.struts.config.ModuleConfig |
getModuleConfig(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
Returns the configuration for the current module. |
protected static org.apache.struts.tiles.ComponentDefinition |
getTilesForward(java.lang.String forwardPath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context,
javax.servlet.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(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
java.lang.String actionPath,
javax.servlet.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(javax.servlet.http.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,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context,
javax.servlet.ServletConfig config)
Verifies that ActionServlet used this logical forward or input mapping. |
protected static void |
verifyNoActionMessages(javax.servlet.http.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,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context,
javax.servlet.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 |
INCLUDE_SERVLET_PATH
protected static final java.lang.String INCLUDE_SERVLET_PATH
- See Also:
- Constant Field Values
logger
protected static org.apache.commons.logging.Log logger
| Constructor Detail |
Common
public Common()
| Method Detail |
verifyNoActionMessages
protected static void verifyNoActionMessages(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.String messageLabel)
- Common method to verify action errors and action messages.
verifyActionMessages
protected static void verifyActionMessages(javax.servlet.http.HttpServletRequest request, java.lang.String[] messageNames, java.lang.String key, java.lang.String messageLabel)
- Common method to verify action errors and action messages.
getTilesForward
protected static org.apache.struts.tiles.ComponentDefinition getTilesForward(java.lang.String forwardPath, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context, javax.servlet.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.
verifyTilesForward
protected static void verifyTilesForward(java.lang.String actionPath, java.lang.String forwardName, java.lang.String expectedDefinition, boolean isInputPath, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context, javax.servlet.ServletConfig config)
- Verifies that ActionServlet used this logical forward or input mapping with this tile definition.
verifyForwardPath
protected static void verifyForwardPath(java.lang.String actionPath, java.lang.String forwardName, java.lang.String actualForwardPath, boolean isInputPath, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context, javax.servlet.ServletConfig config)
- Verifies that ActionServlet used this logical forward or input mapping.
stripActionPath
protected static java.lang.String stripActionPath(java.lang.String path)
- Strips off *.do from action paths specified as such.
stripJSessionID
protected static java.lang.String stripJSessionID(java.lang.String path)
- Strip ;jsessionid=
from path.
getActionForm
protected static org.apache.struts.action.ActionForm getActionForm(java.lang.String actionPath, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
- Returns any ActionForm instance stored in the request or session, if available.
findForward
protected static org.apache.struts.config.ForwardConfig findForward(java.lang.String mappingName, java.lang.String forwardName, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
- 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.
getActionConfig
protected static org.apache.struts.config.ActionConfig getActionConfig(java.lang.String mappingName, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
- Returns the configuration for the given action mapping.
getModuleConfig
protected static org.apache.struts.config.ModuleConfig getModuleConfig(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context)
- Returns the configuration for the current module.
setActionForm
protected static void setActionForm(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, java.lang.String actionPath, javax.servlet.ServletContext context)
- Sets an ActionForm instance in the request.
|
|||||||||
| Home >> All >> servletunit >> [ struts overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
servletunit.struts.Common