**
struts2 跳转
**
Action跳转到jsp
-
forward 默认的跳转方式
type=“dispatcher”<result name="返回值“ type="dispatcher">/跳转的jsp名</result>
-
redirect重定向默认跳转方式
type=“redirect”<result name=”返回值” type=”redirect”>//跳转的jsp名</result> **
Action跳转到Action
**
1.Forward
type=”chain”
<result name=”返回值” type=”chain”>目标action的name属性值 </result>
2.Redirect
type=”redirectAction”
<result name=”返回值” type=”redirectAction”>目标action的name属性值 </result>
注意:
1.不写type ,默认为forward。这种情况只适用与Action跳转到jsp
2.Action到action之间的跳转 必须要写 type=”chain或者写redirectAction”