假设添加文章的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="/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 >
<forward name="succeed" path="/articleLi" redirect="true"/>
</action>
</ action-mappings >