[code]
这里面是我开发过的一个ssh(Struts2,Spring,Hibernate)系统中所用到的相关jar包,里面有很多没有用到的包,可以选择使用。我上传到上面主要是为了以后使用的时候可以更加快速。
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- Struts2 与 Spring 整合 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext*.xml
</param-value>
</context-param>
<!-- 整合Struts2 -->
<filter>
<filter-name>Struts2.0</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>Struts2.0</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 整合Spring与Struts2的类自动加载器 -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>
[/code]
这里面是我开发过的一个ssh(Struts2,Spring,Hibernate)系统中所用到的相关jar包,里面有很多没有用到的包,可以选择使用。我上传到上面主要是为了以后使用的时候可以更加快速。
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- Struts2 与 Spring 整合 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext*.xml
</param-value>
</context-param>
<!-- 整合Struts2 -->
<filter>
<filter-name>Struts2.0</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>Struts2.0</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 整合Spring与Struts2的类自动加载器 -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>
[/code]