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

 

posted @ 2013-07-25 20:49  程序员泥瓦匠  阅读(579)  评论(3编辑  收藏  举报