Search in sources :

Example 76 with ActionConfig

use of org.apache.struts.config.ActionConfig in project sonar-java by SonarSource.

the class TestTagUtils method testString_getActionMappingURL_String_String_PageContext_boolean4.

// use servlet mapping (path mapping)
public void testString_getActionMappingURL_String_String_PageContext_boolean4() {
    pageContext.getServletContext().setAttribute(Globals.SERVLET_KEY, "/myapp/*");
    ActionConfig actionConfig = new ActionConfig();
    actionConfig.setParameter("/foo");
    moduleConfig.addActionConfig(actionConfig);
    request.setAttribute(Globals.MODULE_KEY, moduleConfig);
    request.setPathElements("/mycontext", "/baz", null, null);
    assertEquals("Check path /foo", tagutils.getActionMappingURL("/foo", pageContext), "/mycontext/myapp/foo");
}
Also used : ActionConfig(org.apache.struts.config.ActionConfig)

Aggregations

ActionConfig (org.apache.struts.config.ActionConfig)76 ForwardConfig (org.apache.struts.config.ForwardConfig)14 UnavailableException (javax.servlet.UnavailableException)8 ActionForm (org.apache.struts.action.ActionForm)8 ExceptionConfig (org.apache.struts.config.ExceptionConfig)8 FormBeanConfig (org.apache.struts.config.FormBeanConfig)8 ModuleConfig (org.apache.struts.config.ModuleConfig)8 ServletException (javax.servlet.ServletException)6 MalformedURLException (java.net.MalformedURLException)4 Map (java.util.Map)4 Action (org.apache.struts.action.Action)4 UnauthorizedActionException (org.apache.struts.chain.commands.UnauthorizedActionException)4 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 MissingResourceException (java.util.MissingResourceException)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 JspException (javax.servlet.jsp.JspException)2 ActionErrors (org.apache.struts.action.ActionErrors)2 MockActionContext (org.apache.struts.chain.contexts.MockActionContext)2 ServletActionContext (org.apache.struts.chain.contexts.ServletActionContext)2