You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniele Development-ML <da...@googlemail.com> on 2008/10/07 19:04:50 UTC

Problem with mapping Struts action on complex URLs

Hello everybody,
I am changing the URL action mapping from a simple one (1)
"<project_home>/<action_URL>" to a more complex
"<project_home>/<dir_name>/<action_URL>" (2) but when I am navigating the
web site, I got the following exception.

It is very peculiar since it works fine when the URL is simple (case 1).
Indeed, beside any possible missing reference (I double checked though), I
cannot even access the action directly.

I am sure it's something trivial but I can't really get around this.

Any hint?

Thanks a lot!


07-Oct-2008 17:37:47 org.apache.catalina.core.ApplicationDispatcher invoke
java.lang.IllegalStateException
        at
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)
        at
org.netbeans.modules.web.monitor.server.MonitorResponseWrapper.sendError(MonitorResponseWrapper.java:149)
        at
javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)
        at
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:662)
        at
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:325)
        at
org.apache.catalina.servlets.DefaultServlet.doPost(DefaultServlet.java:361)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
        at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
        at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
        at
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:296)
        at
org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161)
        at
org.apache.jsp.WEB_002dINF.pages.mainMenu_jsp._jspx_meth_c_005fimport_005f1(mainMenu_jsp.java:279)
        at
org.apache.jsp.WEB_002dINF.pages.mainMenu_jsp._jspService(mainMenu_jsp.java:98)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
        at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
        at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
        at
org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.java:1116)
        at
org.apache.struts.action.RequestProcessor.internalModuleRelativeInclude(RequestProcessor.java:1054)
        at
org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeInclude(TilesRequestProcessor.java:369)
        at
org.apache.struts.action.RequestProcessor.processInclude(RequestProcessor.java:598)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
        at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
        at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
        at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

Re: Problem with mapping Struts action on complex URLs

Posted by Antonio Petrelli <an...@gmail.com>.
2008/10/7 Daniele Development-ML <da...@googlemail.com>:
> Hello everybody,
> I am changing the URL action mapping from a simple one (1)
> "<project_home>/<action_URL>" to a more complex
> "<project_home>/<dir_name>/<action_URL>" (2) but when I am navigating the
> web site, I got the following exception.

I suppose that you are using Struts 1.
Are you using Struts modules?
http://struts.apache.org/1.3.8/userGuide/configuration.html#dd_config_modules

> java.lang.IllegalStateException
> ...
> org.apache.jsp.WEB_002dINF.pages.mainMenu_jsp._jspx_meth_c_005fimport_005f1(mainMenu_jsp.java:279)

I suppose that there is a problem in your "mainMenu.jsp" file, that is
not related to your path structure.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with mapping Struts action on complex URLs

Posted by Daniele Development-ML <da...@googlemail.com>.
The segment of the Struts config is:
        <action path="/login" include="/login.jsp"/>
        <action path="/loginSubmit" type="actions.LoginAction"
                name="userData" scope="session" validate="false"
input="/login">
            <forward name="success" path="/private/mainMenu.do"/>
            <forward name="failure" path="/welcome.do"/>
        </action>

        <action path="/private/mainMenu"
include="/WEB-INF/pages/mainMenu.jsp"/>

I'll give a look at Antonio's pointer too.

Thanks,

Dan

On Tue, Oct 7, 2008 at 6:27 PM, Dave Newton <ne...@yahoo.com> wrote:

> --- On Tue, 10/7/08, Daniele Development-ML wrote:
> > I am changing the URL action mapping from a simple one (1)
> > "<project_home>/<action_URL>" to a more complex
> > "<project_home>/<dir_name>/<action_URL>"
> > (2) but when I am navigating the web site, I got the following
> > exception.
> >
> > It is very peculiar since it works fine when the URL is
> > simple (case 1). Indeed, beside any possible missing
> > reference (I double checked though), I cannot even access
> > the action directly.
>
> Without seeing the mapping/configuration you're using it's kinda hard to
> say what might be wrong.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Problem with mapping Struts action on complex URLs

Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 10/7/08, Daniele Development-ML wrote:
> I am changing the URL action mapping from a simple one (1)
> "<project_home>/<action_URL>" to a more complex
> "<project_home>/<dir_name>/<action_URL>"
> (2) but when I am navigating the web site, I got the following 
> exception.
> 
> It is very peculiar since it works fine when the URL is
> simple (case 1). Indeed, beside any possible missing 
> reference (I double checked though), I cannot even access
> the action directly.

Without seeing the mapping/configuration you're using it's kinda hard to say what might be wrong.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org