You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Nathan Jantz (JIRA)" <be...@incubator.apache.org> on 2005/01/12 17:56:17 UTC

[jira] Created: (BEEHIVE-158) IllegalArgumentException when calling an action from a Tiles Definition XML file.

IllegalArgumentException when calling an action from a Tiles Definition XML file.
---------------------------------------------------------------------------------

         Key: BEEHIVE-158
         URL: http://issues.apache.org/jira/browse/BEEHIVE-158
     Project: Beehive
        Type: Bug
  Components: NetUI  
    Versions: V1Alpha    
 Environment: Testing on Windows XP running the normal required components of Beehive: JDK 1.5, Tomcat 5.0.25.
    Reporter: Nathan Jantz


There is a feature in tiles where you can specify an action URL within a Tiles XML Definition file using a ‘path’ attribute like so:

<definition name="tilesDirectActionCall.page" path="/someOtherAction.do">
  <put name="title"  value="Tiles Direct Action Call Page" />
</definition>

So within a traditional Struts/Tiles app, you can have an action defined in the struts-config to call the above definition and in turn the definition can call yet another action.

I’ve tried this scenario in context of a Page Flow webapp and I don’t get the expected result.  I get an IllegalArgumentException (full stack trace below).  The expected result was to get a page/layout display according to the action ‘someOtherAction.do’.

Here are some additional observations from Carlin:
--------------------------

When the initial action forwards to the tiles definition, we call TilesRequestProcessor.processTilesDefinition(). This method then calls doForward() to the action given in the path attribute.

The forward processes this next action and again we process it's forward config, calling TilesRequestProcessor.processTilesDefinition().  This time there is a tiles ComponentContext attribute on the request which implies we do an include (RequestProcessor.doInclude()).  The ComponentContext is just a map of the components that should be used in a given template (e.g. footer -> footer.jsp).

The doInclude fails in servletContext.getRequestDispatcher() because the URI argument for the JSP does not start with a '/' character, the IllegalArgumentException.

Should we be doing something with the URI that we pass to doInlcude()?
Or do we want to be getting the RequestDispatcher from the request for page flows?

--------------------------
Stack Trace:

2005-01-12 09:48:11 StandardWrapperValve[action]: Servlet.service() for servlet
action threw exception java.lang.IllegalArgumentException: Path main.layout-1.jsp does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)
        at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche
r(ApplicationContextFacade.java:196)
        at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.
java:1080)
        at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
TilesRequestProcessor.java:235)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
wardConfig(PageFlowRequestProcessor.java:1431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:231)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
ernal(PageFlowRequestProcessor.java:571)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
geFlowRequestProcessor.java:763)
        at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
utoRegisterActionServlet.java:607)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:703)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
tionDispatcher.java:463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:398)
        at org.apache.atalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:312)
        at org.apache.beehive.netui.pageflow.internal.DefaultForwardRedirectHand
ler.forward(DefaultForwardRedirectHandler.java:114)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.doForward(
PageFlowRequestProcessor.java:1631)
        at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
TilesRequestProcessor.java:237)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
wardConfig(PageFlowRequestProcessor.java:1431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:231)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
ernal(PageFlowRequestProcessor.java:571)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
geFlowRequestProcessor.java:763)
        at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
utoRegisterActionServlet.java:607)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
        at java.lang.Thread.run(Thread.java:595)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-158) IllegalArgumentException when calling an action from a Tiles Definition XML file.

Posted by "Carlin Rogers (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-158?page=comments#action_60636 ]
     
Carlin Rogers commented on BEEHIVE-158:
---------------------------------------

This works OK when the tiles-definition file has an absolute
path to the template JSP as the path attribute of the definition.
In the example for the failure, the path attribute to the layout 
or template JSP is just the name of the JSP which is colocated in 
the same dir as the tiles definition file.

In reviewing some of the tiles doc, it refers to the path as
a URI to the template or layout JSP. Defined as a URI, the
functionality certainly works.

In the tiles-config_1_1.dtd file, the path attribute
is a "RequestPath" entity. A "RequestPath" is... 
"a module-relative URI path, beginning with a slash, that 
identifies a mapped resource (such as a JSP page or a servlet)
within this web application."

Definitely looks like we should be using a path starting with '/'.

I'll add a patch with a test to show this works and then close
it "as designed." 



> IllegalArgumentException when calling an action from a Tiles Definition XML file.
> ---------------------------------------------------------------------------------
>
>          Key: BEEHIVE-158
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-158
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Alpha
>  Environment: Testing on Windows XP running the normal required components of Beehive: JDK 1.5, Tomcat 5.0.25.
>     Reporter: Nathan Jantz
>     Assignee: Carlin Rogers

>
> There is a feature in tiles where you can specify an action URL within a Tiles XML Definition file using a ‘path’ attribute like so:
> <definition name="tilesDirectActionCall.page" path="/someOtherAction.do">
>   <put name="title"  value="Tiles Direct Action Call Page" />
> </definition>
> So within a traditional Struts/Tiles app, you can have an action defined in the struts-config to call the above definition and in turn the definition can call yet another action.
> I’ve tried this scenario in context of a Page Flow webapp and I don’t get the expected result.  I get an IllegalArgumentException (full stack trace below).  The expected result was to get a page/layout display according to the action ‘someOtherAction.do’.
> Here are some additional observations from Carlin:
> --------------------------
> When the initial action forwards to the tiles definition, we call TilesRequestProcessor.processTilesDefinition(). This method then calls doForward() to the action given in the path attribute.
> The forward processes this next action and again we process it's forward config, calling TilesRequestProcessor.processTilesDefinition().  This time there is a tiles ComponentContext attribute on the request which implies we do an include (RequestProcessor.doInclude()).  The ComponentContext is just a map of the components that should be used in a given template (e.g. footer -> footer.jsp).
> The doInclude fails in servletContext.getRequestDispatcher() because the URI argument for the JSP does not start with a '/' character, the IllegalArgumentException.
> Should we be doing something with the URI that we pass to doInlcude()?
> Or do we want to be getting the RequestDispatcher from the request for page flows?
> --------------------------
> Stack Trace:
> 2005-01-12 09:48:11 StandardWrapperValve[action]: Servlet.service() for servlet
> action threw exception java.lang.IllegalArgumentException: Path main.layout-1.jsp does not start with a "/" character
> at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)
>         at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche
> r(ApplicationContextFacade.java:196)
>         at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.
> java:1080)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:235)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:703)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
> tionDispatcher.java:463)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
> ispatcher.java:398)
>         at org.apache.atalina.core.ApplicationDispatcher.forward(ApplicationDis
> patcher.java:312)
>         at org.apache.beehive.netui.pageflow.internal.DefaultForwardRedirectHand
> ler.forward(DefaultForwardRedirectHandler.java:114)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.doForward(
> PageFlowRequestProcessor.java:1631)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:237)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> ContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
> 0)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :793)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ssConnection(Http11Protocol.java:702)
>         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :571)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:644)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (BEEHIVE-158) IllegalArgumentException when calling an action from a Tiles Definition XML file.

Posted by "Nathan Jantz (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-158?page=all ]
     
Nathan Jantz closed BEEHIVE-158:
--------------------------------


Closing as invalid issue and updating Tiles support test suite accordingly.

> IllegalArgumentException when calling an action from a Tiles Definition XML file.
> ---------------------------------------------------------------------------------
>
>          Key: BEEHIVE-158
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-158
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Alpha
>  Environment: Testing on Windows XP running the normal required components of Beehive: JDK 1.5, Tomcat 5.0.25.
>     Reporter: Nathan Jantz
>     Assignee: Nathan Jantz

>
> There is a feature in tiles where you can specify an action URL within a Tiles XML Definition file using a ‘path’ attribute like so:
> <definition name="tilesDirectActionCall.page" path="/someOtherAction.do">
>   <put name="title"  value="Tiles Direct Action Call Page" />
> </definition>
> So within a traditional Struts/Tiles app, you can have an action defined in the struts-config to call the above definition and in turn the definition can call yet another action.
> I’ve tried this scenario in context of a Page Flow webapp and I don’t get the expected result.  I get an IllegalArgumentException (full stack trace below).  The expected result was to get a page/layout display according to the action ‘someOtherAction.do’.
> Here are some additional observations from Carlin:
> --------------------------
> When the initial action forwards to the tiles definition, we call TilesRequestProcessor.processTilesDefinition(). This method then calls doForward() to the action given in the path attribute.
> The forward processes this next action and again we process it's forward config, calling TilesRequestProcessor.processTilesDefinition().  This time there is a tiles ComponentContext attribute on the request which implies we do an include (RequestProcessor.doInclude()).  The ComponentContext is just a map of the components that should be used in a given template (e.g. footer -> footer.jsp).
> The doInclude fails in servletContext.getRequestDispatcher() because the URI argument for the JSP does not start with a '/' character, the IllegalArgumentException.
> Should we be doing something with the URI that we pass to doInlcude()?
> Or do we want to be getting the RequestDispatcher from the request for page flows?
> --------------------------
> Stack Trace:
> 2005-01-12 09:48:11 StandardWrapperValve[action]: Servlet.service() for servlet
> action threw exception java.lang.IllegalArgumentException: Path main.layout-1.jsp does not start with a "/" character
> at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)
>         at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche
> r(ApplicationContextFacade.java:196)
>         at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.
> java:1080)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:235)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:703)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
> tionDispatcher.java:463)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
> ispatcher.java:398)
>         at org.apache.atalina.core.ApplicationDispatcher.forward(ApplicationDis
> patcher.java:312)
>         at org.apache.beehive.netui.pageflow.internal.DefaultForwardRedirectHand
> ler.forward(DefaultForwardRedirectHandler.java:114)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.doForward(
> PageFlowRequestProcessor.java:1631)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:237)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> ContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
> 0)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :793)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ssConnection(Http11Protocol.java:702)
>         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :571)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:644)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (BEEHIVE-158) IllegalArgumentException when calling an action from a Tiles Definition XML file.

Posted by "carlin rogers (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-158?page=history ]

carlin rogers reassigned BEEHIVE-158:
-------------------------------------

    Assign To: carlin rogers

> IllegalArgumentException when calling an action from a Tiles Definition XML file.
> ---------------------------------------------------------------------------------
>
>          Key: BEEHIVE-158
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-158
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Alpha
>  Environment: Testing on Windows XP running the normal required components of Beehive: JDK 1.5, Tomcat 5.0.25.
>     Reporter: Nathan Jantz
>     Assignee: carlin rogers

>
> There is a feature in tiles where you can specify an action URL within a Tiles XML Definition file using a ‘path’ attribute like so:
> <definition name="tilesDirectActionCall.page" path="/someOtherAction.do">
>   <put name="title"  value="Tiles Direct Action Call Page" />
> </definition>
> So within a traditional Struts/Tiles app, you can have an action defined in the struts-config to call the above definition and in turn the definition can call yet another action.
> I’ve tried this scenario in context of a Page Flow webapp and I don’t get the expected result.  I get an IllegalArgumentException (full stack trace below).  The expected result was to get a page/layout display according to the action ‘someOtherAction.do’.
> Here are some additional observations from Carlin:
> --------------------------
> When the initial action forwards to the tiles definition, we call TilesRequestProcessor.processTilesDefinition(). This method then calls doForward() to the action given in the path attribute.
> The forward processes this next action and again we process it's forward config, calling TilesRequestProcessor.processTilesDefinition().  This time there is a tiles ComponentContext attribute on the request which implies we do an include (RequestProcessor.doInclude()).  The ComponentContext is just a map of the components that should be used in a given template (e.g. footer -> footer.jsp).
> The doInclude fails in servletContext.getRequestDispatcher() because the URI argument for the JSP does not start with a '/' character, the IllegalArgumentException.
> Should we be doing something with the URI that we pass to doInlcude()?
> Or do we want to be getting the RequestDispatcher from the request for page flows?
> --------------------------
> Stack Trace:
> 2005-01-12 09:48:11 StandardWrapperValve[action]: Servlet.service() for servlet
> action threw exception java.lang.IllegalArgumentException: Path main.layout-1.jsp does not start with a "/" character
> at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)
>         at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche
> r(ApplicationContextFacade.java:196)
>         at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.
> java:1080)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:235)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:703)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
> tionDispatcher.java:463)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
> ispatcher.java:398)
>         at org.apache.atalina.core.ApplicationDispatcher.forward(ApplicationDis
> patcher.java:312)
>         at org.apache.beehive.netui.pageflow.internal.DefaultForwardRedirectHand
> ler.forward(DefaultForwardRedirectHandler.java:114)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.doForward(
> PageFlowRequestProcessor.java:1631)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:237)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> ContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
> 0)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :793)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ssConnection(Http11Protocol.java:702)
>         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :571)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:644)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (BEEHIVE-158) IllegalArgumentException when calling an action from a Tiles Definition XML file.

Posted by "Carlin Rogers (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-158?page=history ]
     
Carlin Rogers resolved BEEHIVE-158:
-----------------------------------

     Assign To: Nathan Jantz  (was: Carlin Rogers)
    Resolution: Invalid

The TilesDefinitions test and associated files in the NetUI
coreWeb/miniTests/tiles test directory have been updated to include an example for this issue. See revision 157848.

> IllegalArgumentException when calling an action from a Tiles Definition XML file.
> ---------------------------------------------------------------------------------
>
>          Key: BEEHIVE-158
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-158
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Alpha
>  Environment: Testing on Windows XP running the normal required components of Beehive: JDK 1.5, Tomcat 5.0.25.
>     Reporter: Nathan Jantz
>     Assignee: Nathan Jantz

>
> There is a feature in tiles where you can specify an action URL within a Tiles XML Definition file using a ‘path’ attribute like so:
> <definition name="tilesDirectActionCall.page" path="/someOtherAction.do">
>   <put name="title"  value="Tiles Direct Action Call Page" />
> </definition>
> So within a traditional Struts/Tiles app, you can have an action defined in the struts-config to call the above definition and in turn the definition can call yet another action.
> I’ve tried this scenario in context of a Page Flow webapp and I don’t get the expected result.  I get an IllegalArgumentException (full stack trace below).  The expected result was to get a page/layout display according to the action ‘someOtherAction.do’.
> Here are some additional observations from Carlin:
> --------------------------
> When the initial action forwards to the tiles definition, we call TilesRequestProcessor.processTilesDefinition(). This method then calls doForward() to the action given in the path attribute.
> The forward processes this next action and again we process it's forward config, calling TilesRequestProcessor.processTilesDefinition().  This time there is a tiles ComponentContext attribute on the request which implies we do an include (RequestProcessor.doInclude()).  The ComponentContext is just a map of the components that should be used in a given template (e.g. footer -> footer.jsp).
> The doInclude fails in servletContext.getRequestDispatcher() because the URI argument for the JSP does not start with a '/' character, the IllegalArgumentException.
> Should we be doing something with the URI that we pass to doInlcude()?
> Or do we want to be getting the RequestDispatcher from the request for page flows?
> --------------------------
> Stack Trace:
> 2005-01-12 09:48:11 StandardWrapperValve[action]: Servlet.service() for servlet
> action threw exception java.lang.IllegalArgumentException: Path main.layout-1.jsp does not start with a "/" character
> at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:378)
>         at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche
> r(ApplicationContextFacade.java:196)
>         at org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.
> java:1080)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:235)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:703)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
> tionDispatcher.java:463)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
> ispatcher.java:398)
>         at org.apache.atalina.core.ApplicationDispatcher.forward(ApplicationDis
> patcher.java:312)
>         at org.apache.beehive.netui.pageflow.internal.DefaultForwardRedirectHand
> ler.forward(DefaultForwardRedirectHandler.java:114)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.doForward(
> PageFlowRequestProcessor.java:1631)
>         at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(
> TilesRequestProcessor.java:237)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processFor
> wardConfig(PageFlowRequestProcessor.java:1431)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:231)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInt
> ernal(PageFlowRequestProcessor.java:571)
>         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(Pa
> geFlowRequestProcessor.java:763)
>         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(A
> utoRegisterActionServlet.java:607)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> ContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> eContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
> 0)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :793)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ssConnection(Http11Protocol.java:702)
>         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :571)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:644)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira