struts-config.xml配置重定向

来源:互联网 发布:卸载sql server 2017 编辑:程序博客网 时间:2024/05/16 15:29
 假设添加文章的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>
原创粉丝点击