<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	id="WebApp_ID" version="3.0">
	<display-name>dla</display-name>

	<!-- 1. Genericos del web.xml -->
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<!-- 2. Parametros de contexto -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:dispatcher-servlet.xml</param-value>
	</context-param>

	<!-- Etiquetas para los JP's src/resources/message.properties -->
	<context-param>
		<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
		<param-value>message</param-value>
	</context-param>

	<!-- 3. los Listener de Spring 3 -->
	<!-- 3.1 ContextLoaderListener -->
	<!-- Carga el contexto de spring, por eso es importante primero poner los 
		parametros con los cuales se va a inicializar el contexto y despues cargarlo -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<!-- 3.2 ContextLoaderListener -->
	<!-- Es para que spring tenga acceso a los request -->
	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>

	<!-- 4. Filtros de Struts 2 -->
	<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>struts2</filter-name>
		<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
	</filter>

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

	<filter>
		<filter-name>httpHeaderSecurity</filter-name>
		<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
		<async-supported>true</async-supported>
		<init-param>
			<param-name>antiClickJackingOption</param-name>
			<param-value>DENY</param-value>
		</init-param>
	</filter>

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

	<!-- Session -->
	<session-config>
		<session-timeout>30</session-timeout>
		<cookie-config>
			<secure>true</secure>
		</cookie-config>
	</session-config>

	<jsp-config>
		<taglib>
			<taglib-uri>http://dla.com/functions</taglib-uri>
			<taglib-location>/WEB-INF/tld/dlaFunctions.tld</taglib-location>
		</taglib>
	</jsp-config>

	<error-page>
		<exception-type>java.lang.Throwable</exception-type>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>400</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>401</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>403</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>405</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>500</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>501</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>506</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>503</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>504</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
	<error-page>
		<error-code>505</error-code>
		<location>/jsp/errorGeneral.jsp</location>
	</error-page>
</web-app>