struts2 跳转传值

来源:互联网 发布:淘宝开店充话费流程 编辑:程序博客网 时间:2024/06/17 14:21

关于  

@Results( {    @Result(name = "update", location = "XXXX010", type = "chain"),        })public class XXXAction{    ........    .........}


type为 chain、dispatcher、redirect 三种

,dispatcher(默认类型)用于页面转发,页面跳转过程一直是同一个线程,

Action中的数据一直保存在。location只能是页面,不能是另一个action

例如:@Result(name="error",location="/error.jsp")

 

,chain解决type为dispatcher时,location只能是页面的问题,location为Action,数据共享

例如:@Result(name = "update", location = "XXXX010", type = "chain")

 

,redirect原来Action的数据就无法访问!!!暂时没用到

0 0
原创粉丝点击