码迷,mamicode.com
首页 > Web开发 > 详细

SSH整合开发的web.xml配置

时间:2016-04-15 00:28:05      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:

<?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>
<context-param><!--事务配置   -->
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:configs/log4j.properties</param-value>
</context-param>
<listener><!--Spring启动配置   -->
<listener-class> org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<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>

SSH整合开发的web.xml配置

标签:

原文地址:http://www.cnblogs.com/ItsMyLife-1/p/5393320.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!