<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	version="2.5">

	<display-name>youka-manage</display-name>

	<!-- Context ConfigLocation -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:/spring-context*.xml</param-value>
	</context-param>
	<listener>
		<listener-class>com.thinkgem.jeesite.modules.sys.listener.WebContextListener</listener-class>
	</listener>
	<listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>  
	</listener>
	<filter>
		<filter-name>encodingFilter</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>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Apache Shiro -->
	<filter>
		<filter-name>shiroFilter</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
		<init-param>
			<param-name>targetFilterLifecycle</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>shiroFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- PageCache, cache .html suffix.
	<filter>
		<filter-name>PageCacheFilter</filter-name>
		<filter-class>com.thinkgem.jeesite.common.filter.PageCachingFilter</filter-class>
		<init-param>
			<param-name>cacheName</param-name>
			<param-value>pageCachingFilter</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>PageCacheFilter</filter-name>
		<url-pattern>/</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>PageCacheFilter</filter-name>
		<url-pattern>*.html</url-pattern>
	</filter-mapping>-->

	<!-- SiteMesh -->
	<filter>
		<filter-name>sitemeshFilter</filter-name>
		<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>sitemeshFilter</filter-name>
		<url-pattern>/a/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>sitemeshFilter</filter-name>
		<url-pattern>/f/*</url-pattern>
	</filter-mapping>
	
	<!-- MVC Servlet -->
	<servlet>
		<servlet-name>springServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>classpath*:/spring-mvc*.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>springServlet</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

	<!-- DruidStatView -->
	<servlet>
		<servlet-name>DruidStatView</servlet-name>
		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
		<init-param>
			<param-name>allow</param-name>
			<param-value>127.0.0.1</param-value>
		</init-param>
	</servlet>
	<servlet-mapping>
		<servlet-name>DruidStatView</servlet-name>
		<url-pattern>/druid/*</url-pattern>
	</servlet-mapping>
	
	<!-- CKFinder -->
	<servlet>
		<servlet-name>CKFinderConnectorServlet</servlet-name>
		<servlet-class>com.thinkgem.jeesite.common.web.CKFinderConnectorServlet</servlet-class>
		<init-param>
			<param-name>XMLConfig</param-name>
			<param-value>/WEB-INF/ckfinder.xml</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>
			<param-name>configuration</param-name>
			<param-value>com.thinkgem.jeesite.common.web.CKFinderConfig</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>CKFinderConnectorServlet</servlet-name>
		<url-pattern>/static/ckfinder/core/connector/java/connector.java</url-pattern>
	</servlet-mapping>
	<filter>
		<filter-name>FileUploadFilter</filter-name>
		<filter-class>com.ckfinder.connector.FileUploadFilter</filter-class>
		<init-param>
			<param-name>sessionCookieName</param-name>
			<param-value>JSESSIONID</param-value>
		</init-param>
		<init-param>
			<param-name>sessionParameterName</param-name>
			<param-value>jsessionid</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>FileUploadFilter</filter-name>
		<url-pattern>/static/ckfinder/core/connector/java/connector.java</url-pattern>
	</filter-mapping>

	<!-- Userfiles download -->
	<servlet>
	  	<servlet-name>UserfilesDownloadServlet</servlet-name>
	  	<servlet-class>com.thinkgem.jeesite.common.servlet.UserfilesDownloadServlet</servlet-class>
	</servlet>
	<servlet-mapping>
	  	<servlet-name>UserfilesDownloadServlet</servlet-name>
	  	<url-pattern>/userfiles/*</url-pattern>
	</servlet-mapping>
	
	<!-- Validate code -->
	<servlet>
		<servlet-name>ValidateCodeServlet</servlet-name>
		<servlet-class>com.thinkgem.jeesite.common.servlet.ValidateCodeServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>ValidateCodeServlet</servlet-name>
		<url-pattern>/servlet/validateCodeServlet</url-pattern>
	</servlet-mapping>
	
	<!-- FineReport 
	<servlet>
		<servlet-name>ReportServer</servlet-name>
		<servlet-class>com.fr.web.ReportServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>ReportServer</servlet-name>
		<url-pattern>/ReportServer</url-pattern>
	</servlet-mapping>-->
	
	<!-- [INSERT FRAGMENT HERE] -->

	<!-- Session configure, to "youka.properties" file "session.sessionTimeout" parameter.
	<session-config>
		<session-timeout>30</session-timeout>
	</session-config>-->

	<!-- Error page -->
	<!-- <error-page>
		<exception-type>java.lang.Throwable</exception-type>
		<location>/WEB-INF/views/error/500.jsp</location>
	</error-page> -->
	<error-page>
		<error-code>500</error-code>
		<location>/WEB-INF/views/error/500.jsp</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/WEB-INF/views/error/404.jsp</location>
	</error-page>

</web-app>