<web-app 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_3_0.xsd"
	version="3.0">
	<display-name>Inbound eRx</display-name>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<listener>
		<listener-class>org.apache.tiles.extras.module.ModularTilesListener</listener-class>
	</listener>
	
	<filter>
        <filter-name>gzip</filter-name>
        <filter-class>net.sf.ehcache.constructs.web.filter.GzipFilter</filter-class>
    </filter>

      
     <filter-mapping>
        <filter-name>gzip</filter-name>
        <url-pattern>/scripts/*</url-pattern>
    </filter-mapping> 
    
    <filter-mapping>
        <filter-name>gzip</filter-name>
        <url-pattern>/style/*</url-pattern>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>gzip</filter-name>
        <url-pattern>/images/*</url-pattern>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>gzip</filter-name>
        <url-pattern>/resources/*</url-pattern>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>gzip</filter-name>
        <url-pattern>/inb-erx/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    
     <filter>
        <filter-name>etagFilter</filter-name>
        <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
    </filter>
    
     <filter-mapping>
        <filter-name>etagFilter</filter-name>
        <servlet-name>inb-erx</servlet-name>
    </filter-mapping>

	<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>

     <filter>
        <filter-name>XSSFilter</filter-name>
        <filter-class>gov.va.med.pharmacy.web.filter.XSSFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>XSSFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>  

	<!-- Spring MVC Configuration -->
	<servlet>
		<servlet-name>inb-erx</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>public</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>inb-erx</servlet-name>
		<url-pattern>/inb-erx/*</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>public</servlet-name>
		<url-pattern>/public/*</url-pattern>
		<url-pattern>/style/*</url-pattern>
	</servlet-mapping>

    <!--  Let javascript timeout on the UI first which is 30 minutes. -->
	<session-config>
		<session-timeout>32</session-timeout>
	</session-config>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
            classpath*:spring/applicationcontext.xml,
            classpath*:spring/spring_security.xml
		</param-value>
	</context-param>

	<error-page>
		<exception-type>java.lang.Throwable</exception-type>
		<location>/WEB-INF/errorPage.jsp</location>
	</error-page>

	<error-page>
		<error-code>403</error-code>
		<location>/WEB-INF/accessDenied.jsp</location>
	</error-page>

	<error-page>
		<error-code>404</error-code>
		<location>/WEB-INF/page404.jsp</location>
	</error-page>


	<welcome-file-list>
		<welcome-file>/public/landing.jsp</welcome-file>
	</welcome-file-list>

</web-app>