简体   繁体   English

如何在struts2中没有动作类的情况下从一个动作转发到另一个

[英]How to forward from one action to another without action class in struts2

I am new to struts 2. I am moving my struts 1 code to struts 2. Please see below action. 我是Struts 2的新手。我正在将Struts 1的代码移至Struts2。请参阅以下操作。

<action name ="formName" path="/abc.xyz.action" scope="request" type="org.apache.struts.actions.ForwardAction" parameter="/pqr.rst.do">
</action>

So basically JSP calls the action abc.xyz.action.do and without going to any action class (JAVA class) it forwards this action to pqr.rst.do 因此,基本上,JSP调用动作abc.xyz.action.do,而无需转到任何动作类(JAVA类),它将此动作转发到pqr.rst.do

How can i migrate this action mapping in struts 2. 如何在Struts 2中迁移此动作映射。

Thanks in advance. 提前致谢。

To forward: 转发:

<action name="formName" >
    <result type="redirect">/pqr.rst.do</result>
</action>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM