<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">
	<description>tomexam</description>
	<display-name>tomexam</display-name>
	<context-param>
		<param-name>webAppRootKey</param-name>
		<param-value>tomexam.root</param-value>
	</context-param>
	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>classpath:log4j.properties</param-value>
	</context-param>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/etc/spring/applicationContext-*.xml</param-value>
	</context-param>
	<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>
	<filter>
		<filter-name>TomFilter</filter-name>
		<filter-class>com.tom.web.filter.TomFilter</filter-class>
		<init-param>
			<param-name>permitUrls</param-name>
			<param-value>/login.thtml;/common/login.do;/common/logout.do;/inc/checkcode.jsp;/common/expired.thtml;/register.thtml;/common/register.do</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>TomFilter</filter-name>
		<url-pattern>*.thtml</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>TomFilter</filter-name>
		<url-pattern>*.do</url-pattern>
	</filter-mapping>
	
	<listener>
		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<listener>
    	<listener-class>com.tom.web.listener.WebAppListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>dispatcherServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/etc/dispatcherServlet.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>dispatcherServlet</servlet-name>
		<url-pattern>*.thtml</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>dispatcherServlet</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	<session-config>
		<session-timeout>30</session-timeout>
	</session-config>
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<jsp-config>
		<taglib>
			<taglib-uri>http://www.tomexam.com/taglib/tomtag</taglib-uri>
			<taglib-location>/WEB-INF/tld/TomTag.tld</taglib-location>
		</taglib>
	</jsp-config>
	<login-config>
		<auth-method>BASIC</auth-method>
	</login-config>
</web-app>
