Struts2 Action中跳转Action(2)
来源:未知 责任编辑:责任编辑 发表时间:2015-09-16 20:03 点击:次
</interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>
</package>
</struts>
Spring.xml
[html]
<!--
- Application context definition for JPetStore's business layer.
- Contains bean references to the transaction manager and to the DAOs in
- dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation").
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- service start -->
<bean id="uploadAction" class="com.lanstar.resume.action.UploadAction" scope="prototype">
</bean>
<bean id="analysisAction" class="com.lanstar.resume.action.AnalysisAction" scope="prototype">
</bean>
</beans>
两种方式:
需要保存前一个action的属性信息时使用:
[java]
<result name="success" type= "chain"><param name="actionName">analysisAction</param></result>
不保存前一个action的参数可以用这种方法:
[java]
<result name="success" type= "redirect-action"><param name="actionName">analysisAction</param></result>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>