[ 
https://issues.apache.org/jira/browse/WW-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889957#comment-17889957
 ] 

Lukasz Lenart commented on WW-5463:
-----------------------------------

See the example, you must split {{StrutsPrepareAndExecuteFilter}} and use two 
Struts filters: prepare & execute. Then stack filters in the following way:

{code}
    <filter>
        <filter-name>struts2-prepare</filter-name>
        
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareFilter</filter-class>
    </filter>

    <filter>
        <filter-name>sitemesh3</filter-name>
        
<filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class>
    </filter>

    <filter>
        <filter-name>struts2-execute</filter-name>
        
<filter-class>org.apache.struts2.dispatcher.filter.StrutsExecuteFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts2-prepare</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>sitemesh3</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>struts2-execute</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
{code}

> SiteMesh 3.2.1 does not resolve jsp path after Struts Filter
> ------------------------------------------------------------
>
>                 Key: WW-5463
>                 URL: https://issues.apache.org/jira/browse/WW-5463
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - SiteMesh
>    Affects Versions: 7.0.0
>            Reporter: Romain TM
>            Priority: Major
>             Fix For: 7.0.0
>
>
> Hello, I am trying to make Sitemesh 3.2.1 works with my project updated to 
> Struts 7.0.0-M9 without success.
> Indeed, after StrutsFilter applies, the Servlet path contains the final jsp 
> path as usual. However, because the _RequestPath_ is ridden by Sitemesh from 
> the _FORWARD_SERVLET_PATH_ attribute (WabAppContext.java line 95), 
> SiteMeshFilter uses the original path attribute (my struts action name) 
> instead of the resulting jsp path. So the configured decorator for my jsp can 
> not be resolved anymore (It uses to work with Sitemesh 3.0 and Struts 6.3)
> Is it a known issue or a wrong configuration on my side?
> I am using 
> _org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter_ as 
> Struts filter and _org.sitemesh.config.ConfigurableSiteMeshFilter_ as 
> SiteMesh filter
> Thanks for your help



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to