1.首先导入包
struts2的五个基础包:
commons-logging-1.1.jar;
freemarker-2.3.8.jar;
ognl-2.6.9.jar;
struts-core-2.0.6.jar;
xwork-2.0.0.jar.
spring的核心包:spring.jar
二者集成开发所需的包:struts-spring-plugin-2.0.6.jar
2.修改web.xml配置文件
配置spring加载上下文时的监听器
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
3.配置applicationContext.xml
4.OVER
struts2的五个基础包:
commons-logging-1.1.jar;
freemarker-2.3.8.jar;
ognl-2.6.9.jar;
struts-core-2.0.6.jar;
xwork-2.0.0.jar.
spring的核心包:spring.jar
二者集成开发所需的包:struts-spring-plugin-2.0.6.jar
2.修改web.xml配置文件
配置spring加载上下文时的监听器
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
3.配置applicationContext.xml
4.OVER
本文介绍如何将Struts2与Spring框架进行集成。主要内容包括导入必要的库文件、配置web.xml、设置applicationContext.xml等步骤。

被折叠的 条评论
为什么被折叠?



