Hello,

We are migrating from Struts 2.5.26 to 6.0.0
*Issue*
Result type used in struts.xml is the default one and below is an example
of what we have, and we use request attributes as well.
<result name="success">actionB?para1=value1&amp;para2=value2</result>
When migrating to Struts 6.0.0 the above result type is not working anymore.
If we use chain the parameters set in struts.xml file are not available in
ActionB class but the request attributes set in the calling action are
available, when we use redirectAction we get the parameters set in
struts.xml but the request attributes that are set in ActionA are not
available in ActionB.

<action name="actionA" class="org.apache.struts_examples.ActionA">
            <result name="success" type="redirectAction">
                <param name="actionName">actionB</param>
                <param name="para1">value1</param>
            </result>
</action>
<action name="actionB" class="org.apache.struts_examples.ActionB">
         <result>WEB-INF/ActionB.jsp</result>
</action>

In actionB when we try to get the parameter set in struts xml we get null.
System.out.println("para1:" + request.getParameter("para1"));
Note that this was working fine in Struts 2.5.26.

Mapping the results to jsp instead of actions chaining or action
redirection, or removing the parameters from struts xml and finding an
alternate solution will be a time consuming task since it is used
extensively.

Any suggestions in resolving this will help us.

Thank you
Jerald

Reply via email to