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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to