It won't work, you can try adding

<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>

to Struts2 filter mapping. Instead of "dispatcher" try to use "chain" result.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2014/1/7 Thomas Hermann <therm...@mtg.de>:
> Hello,
>
> I have a problem with the resultType "dispatcher" when using sitemesh along
> with the StrutsFilter:
>
> In my struts.xml (see below) I have configured an action (myAction1) that
> forward the request (result-type=dispatcher)
> to another Action (myAction2) that display the view.  In my web.xml(see
> below) I configure the StrutsFilter
> in the recommended way when using sitemesh
> (http://struts.apache.org/release/2.1.x/docs/webxml.html).
>
> But when I invoke "myAction1", I run into an Error: stackoverflow in tomcat
> caused by a looping (JasperException).
> When I check the network traffic with firebug I see:
>
> "GET myAction1.html  404 Not found"
>
> Why the forwarding does not work with my configuration?
>
> Remarks:
> *The result type "redirect" would work in principle.
> *I'm using Stuts2 Version 2.3.15.3
> *In struts.properties: struts.action.extension=html
>
> struts.xml
> -------------------------
>
>      <action name="myAction1" class="requestAction" method="method1">
>           <result name="success"
> type="dispatcher">/path/myAction2.html</result>
>      </action>
>      <action name="myAction2" class="requestAction" method="method2">
>           <result name="success">/WEB-INF/pages/page.jsp
>           </result>
>      </action>
>
> --------------------------
>
> web.xml
> ------------------------
>
>     <filter>
>         <filter-name>struts-prepare</filter-name>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
>     </filter>
>
>     <filter>
>         <filter-name>sitemesh</filter-name>
> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
>     </filter>
>
>     <filter>
>         <filter-name>struts-execute</filter-name>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
>     </filter>
>
>     <filter-mapping>
>         <filter-name>struts-prepare</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>
>     <filter-mapping>
>         <filter-name>sitemesh</filter-name>
>         <url-pattern>/*</url-pattern>
>         <dispatcher>REQUEST</dispatcher>
>         <dispatcher>FORWARD</dispatcher>
>         <dispatcher>INCLUDE</dispatcher>
>     </filter-mapping>
>
>     <filter-mapping>
>         <filter-name>struts-execute</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>
> -----------------------
> Thanks,
> Thomas
>

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

Reply via email to