(1)type="dispatcher" 为默认,用于jsp页面跳转
<result name="success">/index.jsp</result>
完整的写法为:
<result name="success" type="dispatcher">
<param name="location">/index.jsp</param>
</result>
(2)type="redirect" 重定向到jsp、action、外部网址
<result name="success" type="redirect">/index.jsp</result>
<result name="success" type="redirect">/login.do</result>
<result name="success" type="redirect">http://www.baidu.com</result>
(3)type="redirect-action" 重定向到另外一个action
<result name="success" type="redirect-action">
<param name="actionName">login.do</param> 重定向action名
<param name="userId">userId</param>带的参数
</result>
(4)type="chain" 用于action跳转。
<action name="action1" class="org.Action1">
<result name="success" type="chain">action2.do</result>
</action>
<action name="action2" class="org.Action2">
<result name="success">login.jsp</result>
</action>
(5)type="plaintext" 跳转显示源代码
<result name="err" type="plaintext">
<param name="location">具体的位置</param>
<param name="charSet">字符规范(如GBK)</param>
</result>
<result name="success">/index.jsp</result>
完整的写法为:
<result name="success" type="dispatcher">
<param name="location">/index.jsp</param>
</result>
(2)type="redirect" 重定向到jsp、action、外部网址
<result name="success" type="redirect">/index.jsp</result>
<result name="success" type="redirect">/login.do</result>
<result name="success" type="redirect">http://www.baidu.com</result>
(3)type="redirect-action" 重定向到另外一个action
<result name="success" type="redirect-action">
<param name="actionName">login.do</param> 重定向action名
<param name="userId">userId</param>带的参数
</result>
(4)type="chain" 用于action跳转。
<action name="action1" class="org.Action1">
<result name="success" type="chain">action2.do</result>
</action>
<action name="action2" class="org.Action2">
<result name="success">login.jsp</result>
</action>
(5)type="plaintext" 跳转显示源代码
<result name="err" type="plaintext">
<param name="location">具体的位置</param>
<param name="charSet">字符规范(如GBK)</param>
</result>