struts2+spring项目整合步骤
来源:互联网 发布:docker 软件 编辑:程序博客网 时间:2024/05/14 14:08
一、框架的引入和整合
1.导入struts2和spring所需的jar包
2.导入spring支持web的jar包(org.springframework.web-3.0.5.RELEASE.jar)
导入spring整合struts2的jar包(struts2-spring-plugin-2.2.3.jar)
3.添加配置文件:struts.xml,applicationContext.xml,log4j.properties
4.配置web.xml:
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
二、框架的使用
1.导入struts2和spring所需的jar包
2.导入spring支持web的jar包(org.springframework.web-3.0.5.RELEASE.jar)
导入spring整合struts2的jar包(struts2-spring-plugin-2.2.3.jar)
3.添加配置文件:struts.xml,applicationContext.xml,log4j.properties
4.配置web.xml:
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
二、框架的使用
- struts2+spring项目整合步骤
- struts2整合spring步骤
- Struts2, spring,hibernate 整合步骤
- struts2+spring+hibernate整合步骤
- Struts2+Hibernate+Spring整合步骤
- Struts2+Hibernate+Spring整合步骤
- Spring整合struts2+hibernate步骤
- Spring/Struts2整合项目
- Spring、Struts2+Spring+Hibernate整合步骤
- 张英泽 struts2+spring+hibernate整合步骤
- struts2、hibernate、spring的整合步骤
- 整合Struts2与Spring的步骤
- 整合Struts2与Spring的步骤
- java Struts2,Spring,Hibernate的整合步骤
- struts2+spring+hibernate整合步骤《开源》
- Spring整合Struts2步骤及完整实例
- 张英泽 struts2+spring+hibernate整合步骤
- SSH spring+struts2+hibernate整合步骤
- 重定位过程中的位置无关代码和位置相关的代码
- 中断线程
- 如何找回Oracle中system,sys用户的密码
- How WebKit Works
- 【小蒙淘金】3.11晚评-黄金白银晚间分析及部分操作建议
- struts2+spring项目整合步骤
- CDC::CreateCompatibleDC (msdn)
- QT之类介绍
- C/C++中的日期和时间 time_t与struct tm转换
- MSNP9协议分析
- python 系统学习笔记(九)---异常处理
- IOS开发:关于设置UIView的背景为图片的方法以及问题
- Maven学习之 在Android项目上启用maven
- ORACLE