Struts2中struts.xml配置文件中的result节点

来源:互联网 发布:联通网络手机加速器 编辑:程序博客网 时间:2024/05/29 11:06

result节点有两个属性,一个是name属性,值和Action类的返回值对应;另一个属性为type,值为跳转方式。

type的值在struts2的源文件中的struts-default.xml包中的type-name节点定义,有多个,常用的有四个。

1.dispatcher转发到jsp,也是默认的

2.redirect重定向到jsp

3.redirectaction重定向到另一个action

4.chain转发到另一个action

0 0