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>
<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>
相关文章推荐
- Struts-config.xml配置文件讲解
- Struts-struts-config.xml配置详解
- struts-config.xml配置详解
- Struts-config.xml配置文件讲解
- Struts-config.xml配置文件讲解
- struts-config.xml的配置详解
- struts-config.xml中配置的几个主要项目的顺序
- 深入浅出学习Struts1框架(七):ActionServlet实例化之读取struts-config.xml配置文件
- 本次项目中struts-config.xml的配置
- struts-config.xml配置文件详解
- 详解Struts1中的struts-config.xml配置文件
- Struts中如何配置struts-config.xml
- Struts-config.xml配置文件《action-mappings》元素的详解
- Struts中web.xml和struts-config.xml配置详解
- 搭建SSH框架的时候的struts-config.xml配置文件(用controller管理)
- 【转】struts1的struts-config.xml的配置说明
- 【Struts1.2总结】struts-config.xml配置
- struts-config.xml配置文件详解
- struts1.2配置(2)-struts-config.xml
- 【Struts1.2总结】struts-config.xml配置