一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

struts2 action跳轉調用另一個程序

目的:主要為了在一個Action成功后跳轉調用另一個程序。
Struts2.xml
[html]
復制代碼 代碼如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts> <!-- 指定為開發模式(默認值為false) -->
<constant name="struts.devMode" value="false" />
<constant name="struts.i18n.encoding" value="UTF-8"/>
<constant name="struts.custom.i18n.resources" value="message"></constant>
<!-- 上傳文件臨時文件位置 -->
<constant name="struts.multipart.saveDir" value="c:/"></constant>
<!--
<include file="com/lanstar/config/struts/struts_user.xml"/>
--> www.jb51.NET
<package name="resume" namespace="/" extends="struts-default">
<action name="analysisAction" class="analysisAction">
<result name = "success">/jsp/uploadresult.jsp</result>
</action>
<action name="upload" class = "uploadAction">
<result name="success" type= "chain">
<param name="actionName">analysisAction</param>
</result>
<!--<result name = "success">/jsp/uploadresult.jsp</result>
--><result name = "input">/jsp/Upload.jsp</result>
<result name="error">/jsp/error/error.jsp</result>
<interceptor-ref name="fileUpload">
<!-- 單個上傳文件的最大值-->
<param name="maximumSize">409600</param>
<!-- 只能上傳的文件的類型,可到tomcat的web-xml中查看各種文件類型-->
<param name="allowedTypes">text/html,application/msword</param>
</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>

jsp技術struts2 action跳轉調用另一個程序,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 五月六月丁香 | 韩国一区二区三区 | 久久99国产乱子伦精品免费 | 黄色免费在线观看 | 永久免费在线观看视频 | 老司机日日摸夜夜摸精品影院 | 亚洲一区二区在线视频 | 视频www| 黑人巨大videos极度另类 | 国产乱子视频 | 一区二区三区四区在线不卡高清 | 激情文学亚洲 | 婷婷sese| 黄色网络在线观看 | 99久久99久久 | 日本理论午夜中文字幕第一页 | 久久精品国产自在一线 | 久久久99精品久久久久久 | 亚洲国产成人99精品激情在线 | 国产欧美一区二区精品性色99 | 日日好吊妞 | 日韩中文精品亚洲第三区 | 国产美女免费视频 | 国产精品美女网站在线看 | 在线激情小视频 | 最新国产一区二区精品久久 | 亚洲性视频在线 | 麻豆专区 | 玖玖精品视频在线 | 午夜亚洲国产成人不卡在线 | 国产成人免费高清视频网址 | 91久久青青青国产免费 | 国产精品日韩欧美一区二区三区 | 精品久久久久久久久久 | 久久国产美女 | 国产精品成人网 | 97超级碰久久久久香蕉人人 | 午夜大片免费完整在线看 | 天天偷窥网 | 国产激爽大片在线播放 | 亚洲高清中文字幕一区二区三区 |