在Struts2中重定向时在url中传递参数

Mis*_*tyD 3 java struts2

可能重复:
Strut2 - 在下一个Action中获取属性值

我试图使用Struts2实现以下功能

response.sendRedirect("Pay.jsp?msg=transfer");
Run Code Online (Sandbox Code Playgroud)

这就是我在做的事情:

 <action name="AddPayAction" class="controller.AddPayAction">
            <param name="paraA"></param>
            <param name="paraB"></param>
            <param name="msg">SomeMessage</param>
            <result name="error">/Error.jsp</result>
            <result name="success" type="redirect">/Pay.jsp</result>
 </action>
Run Code Online (Sandbox Code Playgroud)

任何建议为什么以上不会被重定向为:

      Pay.jsp?msg=SomeMessage
Run Code Online (Sandbox Code Playgroud)

Mis*_*tyD 9

到目前为止,对我有用的解决方案是

 <result name="success" type="redirect">
                <param name="location">/Pay.jsp?msg=${msg}</param>
 </result>
Run Code Online (Sandbox Code Playgroud)

其中msg的setter和getter在action中定义