四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费91-国产蜜臀97一区二区三区

struts2 action跳轉(zhuǎn)調(diào)用另一個(gè)程序

目的:主要為了在一個(gè)Action成功后跳轉(zhuǎn)調(diào)用另一個(gè)程序。
Struts2.xml
[html]
復(fù)制代碼 代碼如下:
<?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> <!-- 指定為開發(fā)模式(默認(rèn)值為false) -->
<constant name="struts.devMode" value="false" />
<constant name="struts.i18n.encoding" value="UTF-8"/>
<constant name="struts.custom.i18n.resources" value="message"></constant>
<!-- 上傳文件臨時(shí)文件位置 -->
<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">
<!-- 單個(gè)上傳文件的最大值-->
<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]
復(fù)制代碼 代碼如下:
<!--
- 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>

兩種方式:
需要保存前一個(gè)action的屬性信息時(shí)使用:
[Java]
復(fù)制代碼 代碼如下:
<result name="success" type= "chain"><param name="actionName">analysisAction</param></result>

不保存前一個(gè)action的參數(shù)可以用這種方法:
[Java]
復(fù)制代碼 代碼如下:
<result name="success" type= "redirect-action"><param name="actionName">analysisAction</param></result>

jsp技術(shù)struts2 action跳轉(zhuǎn)調(diào)用另一個(gè)程序,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 黄视频免费观看网站| 宇宙奇趣录| 隐秘而伟大豆瓣| 精灵变粤语| 我的新学校英语作文| 成人免费黄色电影| 黑手党电影| 高慧君| 《兄弟》电影在线观看| 电影《地狱天堂》鬼片| 一路狂奔| 天河电影演员表| 总裁掀开她的内衣揉她的柔软视频| 护校队申请书| 九龙城寨在线观看| 好像也没那么热血沸腾电影免费观看 | 孔令辉简历及个人资料| 快手快枪快手演员表| 来生缘吉他谱c调| 科特·柯本| 女人香韩国电影| 好心人| 男同性恋者| 白上之黑电影| 牛油果营养价值| 阴阳界 电影| 苏晓电视剧叫什么名字的| 战长沙每个人的结局| 一元二次不等式的例题100道| 高欣生| 哥谭骑士| 儿子给妈妈过生日,妈妈幸福感言| 真实游戏电影无删减完整版| 小戏骨| 护校队申请书| mhdd| 卡通频道| 重口视频| 永不瞑目演员表| bb88| kanako|