[
https://issues.apache.org/jira/browse/WW-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884554#comment-17884554
]
Romain TM commented on WW-5463:
-------------------------------
Thank you for your answer.
Combining Struts 6.6.0 and Sitemesh 3.0.0, everything works well.
Combining Struts 6.6.0 and Sitemesh 3.1.1, I have the same issue.
After adding breakpoints in the source code, I can observe the same behaviour
using version 6.3.0, 6.6.0 and 7.0.0-M9 of Struts. After Struts Filter, when I
enter SiteMeshFilter :
* request.getRequestURI() = "/jsp/action/Accueil.jsp" -> contains the jsp path
* request.getServletPath() = "/jsp/action/Accueil.jsp" -> contains the jsp path
* request.getAttribute("javax.servlet.forward.servlet_path") = "/Accueil" ->
contains the URI before Struts forwarding (the struts action name)
The difference resides in the way Sitemesh resolves the pattern to use for
decorating :
* In Sitemesh 3.0.0 : it uses request.getServletPath()
* In Sitemesh 3.1.1 and 3.2.1 : it uses
request.getAttribute("javax.servlet.forward.servlet_path")
> 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)