- 转发:
dispatcher
相当于servlet
中的request.getRequestDispatcher("WEB-INF/page/writeblog.jsp").forward(request, response);
<action name="BlogAction" class="cn.action.BlogAction" method="writBlog">
<result name="success" type="dispatcher">/writeblog.jsp</result>
</action>
- 重定向:
redirect
相当于servlet
中的response.sendRedirect("http://www.baidu.com");
<action name="BlogAction" class="cn.action.BlogAction" method="writBlog">
<result name="success" type="redirect">/writeblog.jsp</result>
</action>
- 转发到Action:
chain
<action name="SelectBlogsAction" class="cn.action.SelectBlogsAction" method="Selectblogs">
<result name="success" type="chain">
<param name="actionName">actionName</param>
<param name="namespace">/</param>
</result>
</action>
- 重定向到action:
redirectAction
<action name="SelectBlogsAction" class="cn.action.SelectBlogsAction" method="Selectblogs">
<result name="success" type="redirectAction">
<param name="actionName">actionName</param>
<param name="namespace">/</param>
</result>
</action>