Struts2_result

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>

posted @ 2014-09-26 18:37  四点水这  阅读(119)  评论(0编辑  收藏  举报