<?xml version="1.0" encoding="UTF-8"?>
<web-fragment version="3.0"
    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-fragment_3_0.xsd"
    metadata-complete="true">
    <name>tigon-webmvc</name>
    <ordering>
        <before>
            <others />
        </before>
    </ordering>
    <context-param>
        <param-name>spring.profiles.active</param-name>
        <param-value>profile_active</param-value>
    </context-param>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:spring/**/spring-*.xml</param-value>
	</context-param>
	<context-param>
        <param-name>contextInitializerClasses</param-name>
        <param-value>me.chyxion.tigon.webmvc.war.AppContextInitializer</param-value>
    </context-param>
    <listener> 
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener>  
    <!-- Encoding Filter -->
	<filter>
        <filter-name>encoding</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>
        <async-supported>true</async-supported>
    </filter>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>HiddenHttpMethodFilter</filter-name>
        <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
        <async-supported>true</async-supported>
    </filter>
    <filter-mapping>
        <filter-name>HiddenHttpMethodFilter</filter-name>
        <servlet-name>spring-mvc</servlet-name>
    </filter-mapping> 
    <!-- Spring MVC Dispatcher Servlet -->
    <servlet>
        <servlet-name>spring-mvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
        	<param-name>contextConfigLocation</param-name>
        	<param-value>classpath*:spring/**/servlet-spring-*.xml</param-value>
        </init-param>
        <async-supported>true</async-supported>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>spring-mvc</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-fragment>
