码迷,mamicode.com
首页 > 其他好文 > 详细

Struts2_result

时间:2014-09-26 22:50:48      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:io   sp   cti   on   c   r   bs   服务器   res   

1. type
    <result type="dispather">/r1.jsp</result>    //默认type,服务器自动跳转连接,客户端不知道跳转
    <result type="redirect">/r2.jsp</result>    //服务器返回新连接,客户端再次发送请求跳转
    <result type="chain">r1</result>            //访问另一个action,
                    (此处为name="r1"的action,不要加"/",可以访问另一个包里的action, page/r1),客户端不知道跳转
    <result type="redirectAction">/ri.jsp</result>    //访问另一个action,客户端再次发送请求

2. global-results
    //在这个包中的所有action都可以访问global-results定义的页面
        其他的包需要继承这个包,才能访问这个页面定义的global-results
    <package>
        <global-results>
            <result name="demo">/demo.jsp</result>
        </global-results>
        <action>....
    </package>

Struts2_result

标签:io   sp   cti   on   c   r   bs   服务器   res   

原文地址:http://www.cnblogs.com/sidianshui/p/3995453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!