- 1、本文档共29页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
struts2 ibatis spring整合开发
Struts2+ibatis+spring整合开发
工程结构图
配置文件
web.xml
?xml version=1.0 encoding=UTF-8?
web-app version=2.4
xmlns=/xml/ns/j2ee
xmlns:xsi=/2001/XMLSchema-instance
xsi:schemaLocation=/xml/ns/j2ee
/xml/ns/j2ee/web-app_2_4.xsd
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list
context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param
listener
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
filter
filter-namestruts2/filter-name
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping
/web-app
如图:
Struts.xml
?xml version=1.0 encoding=UTF-8?
!DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.0//EN
/dtds/struts-2.0.dtd
struts
constant name=struts.objectFactory.spring.autoWire value=type /
constant name=struts.objectFactory value=spring /
include file=struts-default.xml/
package name=struts2 extends=struts-default
default-interceptor-ref name=paramsPrepareParamsStack /
!-- aciton的class为applicationContext.xml中的注册名 --
action name=login class=LoginAction
result name=success/success.jsp/result
result name=input/login.jsp/result
/action
action name=save class=LoginAction method=save
result name=success type=redirect-actionshow.action/result
result name=error/error.jsp/result
/action
action name=edit class=LoginAction method=edit
result name=successupdate.jsp/result
/action
action name=update class=LoginAction method=update
result name=success type=redirect-actionshow.action/result
result name=error/error.jsp/result
您可能关注的文档
- protel99se中做拼板图解.doc
- PROTEL99SE原理图及印制板设计要点.doc
- Primavera 6 软件培训.doc
- protel 99 se 中文教程第三章.ppt
- protel 入门 提高 第9章.ppt
- PV60-RGC1 比例压力控制放大板说明书.doc
- ps教案5.doc
- P_12271 无钥匙进入系统.ppt
- Q4 第3章 综合布线系统设计.ppt
- q7A-GMP中英文对照-原稿.doc
- 《GB/Z 44363-2024致热性 医疗器械热原试验的原理和方法》.pdf
- GB/T 16716.6-2024包装与环境 第6部分:有机循环.pdf
- 中国国家标准 GB/T 44376.1-2024微细气泡技术 水处理应用 第1 部分:亚甲基蓝脱色法评价臭氧微细气泡水发生系统.pdf
- 《GB/T 44376.1-2024微细气泡技术 水处理应用 第1 部分:亚甲基蓝脱色法评价臭氧微细气泡水发生系统》.pdf
- GB/T 44376.1-2024微细气泡技术 水处理应用 第1 部分:亚甲基蓝脱色法评价臭氧微细气泡水发生系统.pdf
- 中国国家标准 GB/T 44315-2024科技馆展品设计通用要求.pdf
- GB/T 44305.2-2024塑料 增塑聚氯乙烯(PVC-P)模塑和挤塑材料 第2部分:试样制备和性能测定.pdf
- 《GB/T 44315-2024科技馆展品设计通用要求》.pdf
- GB/T 44315-2024科技馆展品设计通用要求.pdf
- GB/T 39560.9-2024电子电气产品中某些物质的测定 第9 部分:气相色谱-质谱法(GC-MS)测定聚合物中的六溴环十二烷.pdf
文档评论(0)