struts转发和重定向action

1。转发(服务器端跳转)

  <action name="rederTo">
          <result type="chain">hello</result>
  </action>
  <action name="hello">
         <result>/WEB-INF/page/hello.jsp</result>
  </action>
访问路径为:http://localhost:8080/mystruts2/s/rederTo.action

2。重定向(客户端跳转)

  <action name="rederTo">
         <result type="redirectAction">
                <param name="actionName">hello</param>
         </result>
  </action>
  <action name="hello">
         <result>/WEB-INF/page/hello.jsp</result>
  </action>
访问路径为:http://localhost:8080/mystruts2/s/rederTo.action
原文地址:https://www.cnblogs.com/Alandre/p/3215291.html