<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- <?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4" 
	xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> -->

	<display-name>ntsky's bbs</display-name>
	<description>ntsky bbs application</description>

	<context-param>
        <param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext.xml;/WEB-INF/schedulingContext-timer.xml</param-value>
	</context-param>
	
	<listener>
		<listener-class>com.ntsky.bbs.web.listener.OnlineUserListener</listener-class>
	</listener>
	
	<!-- character Encoding	-->
	<filter>
		<filter-name>characterEncoding</filter-name>
		<filter-class>com.ntsky.framework.util.servlet.SetCharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>characterEncoding</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<servlet>
		<servlet-name>initLog4j</servlet-name>
		<servlet-class>com.ntsky.framework.util.servlet.Log4j</servlet-class>
		<init-param>
			<param-name>log4j</param-name>
			<param-value>WEB-INF/config/Log4j.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>initSystem</servlet-name>
		<servlet-class>com.ntsky.bbs.web.servlet.SystemINIT</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>  

    <!-- <filter>
        <filter-name>hibernateFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    </filter>-->

   <filter>
        <filter-name>webwork-cleanup</filter-name>
        <filter-class>com.opensymphony.webwork.dispatcher.ActionContextCleanUp</filter-class>
    </filter> 

	<!--
	<servlet>  
	    <servlet-name>freemarker</servlet-name>  
	    <servlet-class>com.opensymphony.webwork.views.freemarker.FreemarkerServlet</servlet-class>   
	</servlet>
	-->	
	
    <filter>
        <filter-name>webwork</filter-name>
        <filter-class>com.opensymphony.webwork.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <!-- 
    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
    </filter> 
	<servlet>
	    <servlet-name>sitemesh-freemarker</servlet-name>
	    <servlet-class>com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet</servlet-class>
		<init-param>
			<param-name>TemplatePath</param-name>
			<param-value>/</param-value>
		</init-param>
        <init-param>
            <param-name>default_encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>		
        <load-on-startup>3</load-on-startup>
	</servlet>
	-->
    <!-- 
    <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    -->
    <filter-mapping>
        <filter-name>webwork-cleanup</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>  
    
    <filter-mapping>
        <filter-name>webwork</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>      
    
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
           
    <!-- FCKeditor begin -->       
    <servlet>
        <servlet-name>Connector</servlet-name>
        <servlet-class>com.ntsky.bbs.web.fckeditor.FCKeditorConnectorServlet</servlet-class>
        <init-param>
                <param-name>baseDir</param-name>
                <param-value>/UserFiles/</param-value>
        </init-param>
        <init-param>
                <param-name>debug</param-name>
                <param-value>false</param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsFile</param-name>
                <param-value></param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsFile</param-name>
                <param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsImage</param-name>
                <param-value>jpg|gif|jpeg|png|bmp</param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsImage</param-name>
                <param-value></param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsFlash</param-name>
                <param-value>swf|fla</param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsFlash</param-name>
                <param-value></param-value>
        </init-param>        
        <load-on-startup>4</load-on-startup>
	</servlet>
	<servlet-mapping>
	        <servlet-name>Connector</servlet-name>
	        <url-pattern>/scripts/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
	</servlet-mapping>  
	
	 <servlet>
        <servlet-name>SimpleUploader</servlet-name>
        <servlet-class>com.ntsky.bbs.web.fckeditor.FCKeditorUploadServlet</servlet-class>
        <init-param>
                <param-name>baseDir</param-name>
                <param-value>/UserFiles/</param-value>
        </init-param>
        <init-param>
                <param-name>debug</param-name>
                <param-value>false</param-value>
        </init-param>
        <init-param>
                <param-name>enabled</param-name>
                <param-value>true</param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsFile</param-name>
                <param-value></param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsFile</param-name>
                <param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsImage</param-name>
                <param-value>jpg|gif|jpeg|png|bmp</param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsImage</param-name>
                <param-value></param-value>
        </init-param>
        <init-param>
                <param-name>AllowedExtensionsFlash</param-name>
                <param-value>swf|fla</param-value>
        </init-param>
        <init-param>
                <param-name>DeniedExtensionsFlash</param-name>
                <param-value></param-value>
        </init-param>
        <load-on-startup>5</load-on-startup>
	</servlet>
	<servlet-mapping>
	  <servlet-name>SimpleUploader</servlet-name>
	  <url-pattern>/scripts/FCKeditor/editor/filemanager/upload/simpleuploader</url-pattern>
	</servlet-mapping> 
	 <!-- FCKeditor end -->  
           
	<servlet>
		<servlet-name>validate</servlet-name>
		<servlet-class>com.ntsky.framework.util.servlet.ValidateCode</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>validate</servlet-name>
		<url-pattern>/servlet/validate.gif</url-pattern>
	</servlet-mapping>     
	
	<servlet>
		<servlet-name>download</servlet-name>
		<servlet-class>com.ntsky.bbs.web.servlet.DownloadServlet</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>download</servlet-name>
		<url-pattern>/servlet/download</url-pattern>
	</servlet-mapping>     

	<session-config>
		<session-timeout>10</session-timeout>
	</session-config>	
            
     <welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <error-page>
        <error-code>500</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>403</error-code>
        <location>/403.jsp</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/404.jsp</location>
    </error-page>
 
</web-app>
