<?xml version="1.0" encoding="UTF-8"?>
<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_2_5.xsd"
	version="2.5">

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:applicationContext.xml</param-value>
	</context-param>

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

	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>

	<filter>
		<filter-name>senderror</filter-name>
		<filter-class>org.seasar.cubby.filter.SendErrorFilter</filter-class>
		<init-param>
			<param-name>statusCode</param-name>
			<param-value>404</param-value>
		</init-param>
		<!--
			<init-param> <param-name>ignorePathPattern</param-name>
			<param-value>.*/index.jsp</param-value> </init-param>
		-->
	</filter>

	<filter>
		<filter-name>encoding</filter-name>
		<filter-class>org.seasar.cubby.filter.EncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>

	<filter>
		<filter-name>cubby</filter-name>
		<filter-class>org.seasar.cubby.filter.CubbyFilter</filter-class>
		<init-param>
			<param-name>ignorePathPattern</param-name>
			<param-value>/css/.*,/js/.*,/img/.*</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>senderror</filter-name>
		<url-pattern>*.jsp</url-pattern>
		<dispatcher>REQUEST</dispatcher>
	</filter-mapping>

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

	<filter-mapping>
		<filter-name>cubby</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>

	<servlet>
		<servlet-name>cubby</servlet-name>
		<servlet-class>org.seasar.cubby.servlet.CubbyServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>cubbyadmin</servlet-name>
		<servlet-class>org.seasar.cubby.admin.servlet.CubbyAdminServlet</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>cubbyadmin</servlet-name>
		<url-pattern>/cubby-admin</url-pattern>
	</servlet-mapping>

	<!--
		<session-config> <session-timeout>1</session-timeout>
		</session-config>
	-->

	<welcome-file-list>
		<welcome-file>/</welcome-file>
	</welcome-file-list>

	<jsp-config>
		<jsp-property-group>
			<url-pattern>*.jsp</url-pattern>
			<el-ignored>false</el-ignored>
			<page-encoding>UTF-8</page-encoding>
			<scripting-invalid>false</scripting-invalid>
			<include-prelude>/common/header.jsp</include-prelude>
			<trim-directive-whitespaces>true</trim-directive-whitespaces>
		</jsp-property-group>
	</jsp-config>

</web-app>
