[ 
https://issues.apache.org/jira/browse/WW-5548?focusedWorklogId=968904&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-968904
 ]

ASF GitHub Bot logged work on WW-5548:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/May/25 06:07
            Start Date: 08/May/25 06:07
    Worklog Time Spent: 10m 
      Work Description: sonarqubecloud[bot] commented on PR #1265:
URL: https://github.com/apache/struts/pull/1265#issuecomment-2861881299

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1265) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 New 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=1265&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=1265&issueStatuses=ACCEPTED)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=1265&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [100.0% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1265&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1265&metric=new_duplicated_lines_density&view=list)
  
     
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1265)
   
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 968904)
    Time Spent: 40m  (was: 0.5h)

> Request attribute jakarta.servlet.forward.servlet_path incorrectly set by 
> ServletDispatcherResult breaking sitemesh integration
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-5548
>                 URL: https://issues.apache.org/jira/browse/WW-5548
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 7.0.0
>            Reporter: Martin
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.1.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The servlet request parameter jakarta.servlet.forward.servlet_path has the 
> following documentation in tomcat: 
> {noformat}
> The name of the request attribute that should be set by the container when 
> the forward(ServletRequest, ServletResponse) method is called. It provides 
> the original value of a path-related property of the request. See the chapter 
> "Forwarded Request Parameters" in the Servlet Specification for details.
> {noformat}
> Strut's org.apache.struts2.result.ServletDispatcherResult#doExecute method is 
> breaking this spec in a couple of ways: 
>  # it's setting the parameter to be the  path that the request is about to be 
> _forwarded_ to, not the _original_ path.
>  # it's setting the parameter itself, when that should be the responsibility 
> of the container (in this case, Tomcat) when  forward() is invoked.
> Documentation for jakarta.servlet.forward.servlet_path
> https://jakarta.ee/specifications/servlet/6.0/jakarta-servlet-spec-6.0#forwarded-request-parameters
> Tomcat container implementation of forward() which is responsible for setting 
> the parameter
> https://github.com/apache/tomcat/blob/99ebd1e375297ad02846322e85d533c61077a7dc/java/org/apache/catalina/core/ApplicationDispatcher.java#L241
> This is breaking integration with other tools which expect the 
> FORWARD_SERVLET_PATH to be set correctly, such as sitemesh (from version 3.1 
> onwards)
> {code:xml}
> <sitemesh>
>     ....
>     <mapping path="/auth/*.action" decorator="/WEB-INF/decorators/main.jsp"/>
>     ....
> </sitemesh>
> {code}
> Sitemesh now picks up the incorrectly set FORWARD_SERVLET_PATH which in my 
> case is mapped to a JSP in struts.xml like so 
> {code:xml}
> <struts>
> ...
>   <package name="authoritative links" extends="pkb-default" namespace="/auth" 
> strict-method-invocation="true">
>     <action name="dashboard" class="com.pkb.action.DashboardAction">
>       <result name="success">/WEB-INF/view/dashboard.jsp</result>
>     </action>
> ...
> {code}
> and my decorator is no longer applied, when it was previously.
> This behaviour was introduced in WW-5463



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

Reply via email to