服务器端跳转 客户端跳转
<action name="r1" >
<result type="dispatcher" >/r1.jsp</result>
</action>
<action name="r2" >
<result type="redirect" >/r2.jsp</result>
</action>
<action name="r3" >
<result type="chain" >r1</result>
</action>
<action name="r4" >
<result type="redirectAction" >r2</result>
</action>
显示地址栏按顺序分别为:
http://localhost:8080/Struts2/r1 ------- r1
http://localhost:8080/Struts2/r2.jsp ----------- r2
http://localhost:8080/Struts2/r3 ---------------- r1
http://localhost:8080/Struts2/r2.jsp ------------------r2