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

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

                Author: ASF GitHub Bot
            Created on: 07/Feb/26 18:44
            Start Date: 07/Feb/26 18:44
    Worklog Time Spent: 10m 
      Work Description: sonarqubecloud[bot] commented on PR #1571:
URL: https://github.com/apache/struts/pull/1571#issuecomment-3865072546

   ## [![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=1571) 
**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=1571&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=1571&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=1571&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=1571&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=1571&metric=new_duplicated_lines_density&view=list)
  
     
   [See analysis details on SonarQube 
Cloud](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1571)
   
   




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

    Worklog Id:     (was: 1004005)
    Time Spent: 20m  (was: 10m)

> Adding a jndi-lookup Spring bean breaks ServletActionRedirectResult
> -------------------------------------------------------------------
>
>                 Key: WW-3647
>                 URL: https://issues.apache.org/jira/browse/WW-3647
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter, Plugin - Spring
>    Affects Versions: 2.2.3
>            Reporter: Miguel Almeida
>            Assignee: Lukasz Lenart
>            Priority: Major
>              Labels: injection, redirectAction, spring, struts2
>             Fix For: 7.2.0
>
>         Attachments: redirectActionErrorTest.zip, 
> redirectActionErrorWithJunitTest.zip
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When you add the following bean to a Spring-Struts application:
> <jee:jndi-lookup jndi-name="someName" id="currentEnvironment" 
> default-value="XXXX"  />
> Whenever you have an action with a redirectAction type, Struts will try to 
> redirect you to:
> http://localhost:8080/XXXX/index!XXXX.action#XXXX
> This happens because the 3 String argument constructor for 
> ServletActionRedirectResult will set action, method and namespace to whatever 
> value is defined for that bean (XXXX in the example, if you don't have a 
> someName JDNI property).
> This only happens when you let struts manage ServletActionRedirectResult. If 
> you add the following Spring bean:
>       <bean id="myRedirect" 
> class="org.apache.struts2.dispatcher.ServletActionRedirectResult"
>               scope="prototype" autowire="byName">
>       </bean>
> and add a                     <result-type name="myRedirect"  
> class="myRedirect" /> result type, the problem doesn't appear.
> I've added a testCase for you to confirm.



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

Reply via email to