首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

struts中页面的跳转有关问题

2012-11-10 
struts中页面的跳转问题今天一天的学习学到了很多东西,有些出现的错误没有及时做记录,就不说了;记忆最深刻

struts中页面的跳转问题
今天一天的学习学到了很多东西,有些出现的错误没有及时做记录,就不说了;


记忆最深刻的是struts中的页面跳转问题。示例代码如下:


<action name="modifyBlogGlobalCategory" method="modifyBlogGlobalCategory">
<result name="success" type="redirectAction">viewBlogGlobalCategory</result>
<result name="error">/administrator/failure.jsp</result>
</action>

<action name="viewBlogGlobalCategory" method="viewBlogGlobalCategory">
<result name="success">/administrator/show_categories.jsp</result>
<result name="input" >/administrator/show_categories.jsp</result>
<result name="error" >/administrator/failure.jsp</result>
</action>

第一种 type="redirectAction"可以通过action name直接跳转

第二种只能通过指定相应的页面跳转

热点排行