<?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 https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>/WEB-INF/classes/log4j.xml</param-value>
	</context-param>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/spring/root-context.xml, /WEB-INF/spring/db-context.xml, /WEB-INF/spring/security-context.xml</param-value>
	</context-param>

	<!-- Creates the Spring Container shared by all Servlets and Filters -->
	
    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
	<listener>
	  	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 	</listener> 
	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener> 	

	  
	<!-- Processes application requests -->	
	<servlet>
		<servlet-name>appServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
		
	<servlet-mapping>
		<servlet-name>appServlet</servlet-name>
		<url-pattern>*.co</url-pattern>
	</servlet-mapping>
	
	
	<!-- spring security  filter --> 	 
	<filter>
	    <filter-name>springSecurityFilterChain</filter-name>	    
	    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
	</filter>  
	<filter-mapping>
	    <filter-name>springSecurityFilterChain</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>  
		
	<!-- spring security  Cutom filter --> 
	<!-- 
	<filter>
	    <filter-name>customAuthFilter</filter-name>	    
	    <filter-class>com.elt.ems.security.CustomAuthenticationFilter</filter-class>
	</filter>  
	<filter-mapping>
	    <filter-name>customAuthFilter</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>  
	 -->
			
	<!-- UTF-8 -->
	<filter>
		<filter-name>encoding-filter</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-mapping>
		<filter-name>encoding-filter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>	
		
		
    <welcome-file-list>
        <welcome-file>/index.co</welcome-file>
    </welcome-file-list>
    
	<error-page>
		<error-code>403</error-code>
		<location>/error.co?code=403</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/error.co?code=404</location>
	</error-page>	 
	<error-page>
		<error-code>405</error-code>
		<location>/error.co?code=405</location>
	</error-page>	
	<error-page>
		<error-code>500</error-code>
		<location>/error.co?code=500</location>
	</error-page>		
	 
	<error-page>
  		<exception-type>com.elt.ems.common.BusinessException</exception-type>
  		<location>/exception.co</location>  	
  	</error-page>
  	  	  
	<session-config>
        <session-timeout>360</session-timeout>
	</session-config>
	       
	<servlet>
		<servlet-name>Configuration</servlet-name>
		<servlet-class>com.elt.util.ConfigUtil</servlet-class>
		<init-param>
			<param-name>configFile</param-name>
			<param-value>E:\eclipse\workspace40\emsa\src\main\webapp\WEB-INF\config\config.xml</param-value>
		</init-param>
		<load-on-startup>3</load-on-startup>
	</servlet>


</web-app>
