您的位置:首页 > 编程语言 > Java开发

struts-config.xml配置重定向

2007-03-17 11:30 477 查看
假设添加文章的action为addArticle.do,添加完文章之后,跳转到articleList.do,如果"redirect"没有设为"true"(默认"false"),则刷新页面后又添加文章了。


<action-mappings>


<action path="/articleList" type="org.springframework.web.struts.DelegatingActionProxy" scope="request">


<forward name="succeed" path="/codeTypeList.jsp" />


</action>
<action path="/addArticle" type="org.springframework.web.struts.DelegatingActionProxy" scope="request">


<forward name="succeed" path="/articleLi" redirect="true"/>


</action>


</action-mappings>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: