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

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

                Author: ASF GitHub Bot
            Created on: 30/Aug/24 12:52
            Start Date: 30/Aug/24 12:52
    Worklog Time Spent: 10m 
      Work Description: sonarcloud[bot] commented on PR #1034:
URL: https://github.com/apache/struts/pull/1034#issuecomment-2321153273

   ## [![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=1034) 
**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=1034&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=1034&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=1034&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [80.0% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1034&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=1034&metric=new_duplicated_lines_density&view=list)
  
     
   [See analysis details on 
SonarCloud](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1034)
   
   




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

    Worklog Id:     (was: 932634)
    Time Spent: 0.5h  (was: 20m)

> ServletDispatcherResult Forwarding GET Instead of FORWARD
> ---------------------------------------------------------
>
>                 Key: WW-5450
>                 URL: https://issues.apache.org/jira/browse/WW-5450
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 7.0.0
>            Reporter: Rubens Gomes
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I am running Struts "7.0.0-M9" along with Spring Boot "3.3.2" + Spring 
> Security with embedded tomcat version is "10.1.26"
>  
> Environment:
> Struts 2 "7.0.0-M9"
> Spring Boot "3.3.2"
> Tomcat "10.1.26"
> Java 21
>  
> I have a Struts Action class annotated with :
> {code:java}
> @Result( 
>   name = Action.INPUT,
>   location = "/WEB-INF/content/%{#request.device}/login.jsp",
>   type = "dispatcher"
> ){code}
>  I have noticed that after returning from the Action class 
> (ViewLoginAction.java) the framework is invoking the above JSP using a 
> DispatcherType.GET instead of DisplatcherType.FORWARD.
> StrutsRequestWrapper is missing request attribute 
> "jakarta.servlet.forward.request_uri"
> Then, tomcat "org.apache.catalina.core.ApplicationDispatcher" doForward 
> method fails to find that attribute in the following line:
> {code:java}
> if (hrequest.getAttribute(FORWARD_REQUEST_URI) == null)
> { 
>   ...
>   ...
>   // then tomcat defaults to setting value of various request attributes 
>   ...
>   ...
> }
>  
> {code}
>  
> And after that, tomcat calls "processRequest(request, response, state);" in 
> the same instance "ApplicationDispatcher" and fails to resolve a FORWARD 
> dispatcher type below.
>  
> Instead, it resolves a REQUEST. And when tomcat sees REQUEST dispatcher type 
> it does a GET on the JSP, instead of FORWARD.
>  
> Should StrutsRequestWrapper have request attribute 
> "jakarta.servlet.forward.request_uri"?  If not why tomcat is resolving a GET 
> instead of FORWARD? 
>  
> I do not see this issue with Struts 6.6.0 + Spring 2.7.18 with embedded 
> Tomcat "9.0.83". which is based on javax.servlet instead.
>  
> —
> Rubens Gomes
>  



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

Reply via email to