1 转发
<!--转发 --> <action name="Demo1Action" class="www.test.a_result.Demo1Action" method="execute"> <result name="success" type="dispatcher">/hello.jsp</result> </action>
2 重定向
<!--重定向 --> <action name="Demo2Action" class="www.test.a_result.Demo2Action" method="execute"> <result name="success" type="redirect">/hello.jsp</result> </action>
3 转发到Action
<!--转发到Action --> <action name="Demo3Action" class="www.test.a_result.Demo3Action" method="execute"> <result name="success" type="chain"> <!-- action的名字 --> <param name="actionName">Demo1Action</param> <!-- action所在的命名空间 --> <param name="namespace">/</param> </result> </action>
4 重定向到Action
<!-- 重定向到Action --> <action name="Demo4Action" class="www.test.a_result.Demo4Action" method="execute"> <result name="success" type="redirectAction"> <!-- action的名字 --> <param name="actionName">Demo1Action</param> <!-- action所在的命名空间 --> <param name="namespace">/</param> </result> </action>