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

Romain TM commented on WW-5463:
-------------------------------

Thanks for your answer.

Unfortunately, even if I split the struts prepare and execute filter I get the 
same issue. However, when I run your example it works.

In my case, after struts filter applies, the ApplicationDispatcher of tomcat 
changes the request servlet path with the resulting jsp URI and keep the 
original servlet path (before forwarding) in the 
_javax.servlet.forward.servlet_path_ attribute. So when i reach the 
SiteMeshFilter the path used to find my decorator is the original servlet path 
instead of my jsp path (what I had before upgrading).

In your example, the ApplicationDispatcher does the same, but before reaching 
sitemeshfilter the request is unwrapped and goes back to the values before 
forwarding. So the _javax.servlet.forward.servlet_path_ is null and the path 
used to resolve the decorator is read in the servlet path.

I am still investigating to understand why the behaviour differs between my 
code and yours (I have plenty of filters in the filter chain) and let you know 
when I got news.

 

> 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
>            Assignee: Lukasz Lenart
>            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