<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
		 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<!-- session超时定义,单位为分钟 -->
	<session-config>
		<session-timeout>600</session-timeout>
	</session-config>
	
	<!-- 默认首页定义 -->
	<welcome-file-list>
		<welcome-file>/index.do</welcome-file>
	</welcome-file-list>
	
	<!-- Error Page定义 -->
	<error-page>
		<error-code>500</error-code>
		<location>/commons/error.jsp</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/commons/404.jsp</location>
	</error-page>
	<error-page>
		<error-code>403</error-code>
		<location>/commons/403.jsp</location>
	</error-page>
			 
	<!-- Spring ApplicationContext配置文件的路径�,可使用通配符，多个路径用�1,号分隔
	  此参数用于后面的Spring-Context loader -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:spring/*.xml</param-value>
	</context-param>
	
	<!-- JSTL i18n定义-->
	<context-param>
		<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
		<param-value>i18n/messages</param-value>
	</context-param>
	
	<filter>
		<filter-name>SimpleCORSFilter</filter-name>
		<filter-class>com.blueland.bpm.manage.service.SimpleCORSFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>SimpleCORSFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<filter>
		<filter-name>XssFilter</filter-name>
		<filter-class>com.blueland.bpm.manage.util.XssFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>XssFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<!-- 直接从客户端过来的请求以及通过forward过来的请求都要经过该过滤器 -->
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>
	
	
	<!-- Character Encoding filter -->
	<filter>
		<filter-name>CharacterEncodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>

	
 	<filter>
 		<filter-name>CheckUserLoginFilter</filter-name>
 		<filter-class>com.blueland.bpm.manage.util.CheckUserLoginFilter</filter-class> 
	</filter>
	<filter-mapping>
		<filter-name>CheckUserLoginFilter</filter-name> 
		<url-pattern>*.do</url-pattern> </filter-mapping>
	<filter-mapping>
		<filter-name>CheckUserLoginFilter</filter-name> 
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping> 
	
			
	<filter-mapping>
		<filter-name>CharacterEncodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	
	<!--Spring ApplicationContext 载入 -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<!-- 使Spring支持request与session的scope,如:<bean id="loginAction" class="com.foo.LoginAction" scope="request"/> -->
	<listener>
	  <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>

	<!-- Spring 刷新Introspector防止内存泄露 -->
	<listener>
		<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
	</listener>
	
	<!-- springmvc 配置 -->
	<servlet>
	    <servlet-name>springmvc</servlet-name>
	    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
	     <init-param>  
            <param-name>contextConfigLocation</param-name>  
            <param-value>classpath*:/spring/springmvc-servlet.xml</param-value>
        </init-param>
	    <load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
	    <servlet-name>springmvc</servlet-name>
	    <url-pattern>*.do</url-pattern>
	</servlet-mapping>
	
	
	
   <!-- druid config start -->  
   <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,*.swf,*.ico,/druid/*</param-value>  
        </init-param>  
        <init-param>
    <param-name>profileEnable</param-name>
    <param-value>true</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>
	 <!-- druid config end -->  
</web-app>