阅读背景:

Struts2 转发和重定向的实现方法

来源:互联网 
1。转发(服务器端跳转)
 
  <action name="rederTo">
          <result type="chain">hello</result>
  </action>
  <action name="hello">
         <result>/WEB-INF/page/hello.jsp</result>
  </action>
访问路径为:https://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>
访问路径为:https://localhost:8080/mystruts2/s/rederTo.action1。转发(服务器端跳转)
 
  <action name="rederTo">
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: