<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- druid监控如果连接池不是druid则不用配置 -->
<filter>
<filter-name>DruidWebStatFilter</filter-name>
<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
<init-param>
<param-name>exclusions</param-name>
<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>DruidWebStatFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>DruidStatView</servlet-name>
<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DruidStatView</servlet-name>
<url-pattern>/druid/*</url-pattern>
</servlet-mapping>
<!--http://localhost:8080/SSHDruid/druid/index.html -->
<filter><!--配置Struts拦截器,将符合某种特征的请求全部交给这个 Filter处理 -->
<filter-name>struts22</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>struts-default.xml,struts-plugin.xml,configs/struts.xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts22</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param><!--Spring启动配置 -->
<param-name>contextConfigLocation</param-name>
<param-value>classpath:configs/applicationContext.xml</param-value>
</context-param>
<listener><!--Spring启动配置 -->
<listener-class> org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param><!--事务配置 -->
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:configs/log4j.properties</param-value>
</context-param>
<listener><!--事务配置 -->
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
</web-app>