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

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

Hi,
Sorry for the delay in responding. I have just committed an example derived 
from your branch (on a new github repo and just invited you, I could not commit 
into your branch).

When you open  http://localhost:8080/helloworld, the request will pass through 
HelloWorldAction execute method, and will be forwarded to the hello.jsp file. 

If you look into the sitemesh configuration, I expect to decorate the resulting 
JSP with decorator2.html. If you put a breakpoint into WebAppCOntext.java line 
114, you can see that instead of using the forwarded servlet path (the 
resulting jsp path) to resolve the decorator to apply it uses the original 
servlet path from the parameter jakarta.servlet.forward.servlet_path. So it 
uses the default decorator instead.

request.getServletPath() = "/WEB-INF/hello.jsp"
request.getAttribute("jakarta.servlet.forward.servlet_path") = "/helloworld"

This behaviour has been introduced in Sitemesh 3.1.1 and 3.2.1 and differs from 
version 3.0.0

> 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