<?xml version="1.0" encoding="UTF-8"?>

<!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>

  <display-name>beida</display-name>   
    <!-- Possible values: hibernate (might be more in the future) -->
    <context-param>
        <param-name>daoType</param-name>
        <param-value>hibernate</param-value>
    </context-param>
     <!-- Define the basename for a resource bundle for I18N -->
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>ApplicationResources</param-value>
    </context-param>
    <!-- Fallback locale if no bundles found for browser's preferred locale -->
    <!-- Force a single locale using param-name 'javax.servlet.jsp.jstl.fmt.locale' -->
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
        <param-value>zh_CN</param-value>
    </context-param>
    <!-- Context Configuration locations for Spring XML files -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext-*.xml</param-value>
    </context-param>
	<filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
    </filter>
    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>GB2312</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>hibernateFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate.support.OpenSessionInViewFilter</filter-class>
    </filter>	
	<filter>
        <filter-name>AuthenticationFilter</filter-name>
        <filter-class>cn.com.xunuo.webapp.filter.AuthenticationFilter</filter-class>
		<init-param>
            <param-name>legalPaths</param-name>	
			<param-value>/sys/login.jsp,/sys/login.html,/sys/welcome.jsp</param-value>
        </init-param>
		<init-param>
            <param-name>filterPaths</param-name>
            <param-value>/sys/</param-value>
        </init-param>
		<init-param>
            <param-name>loginPage</param-name>
            <param-value>/sys/login.jsp</param-value>
        </init-param>
		<init-param>
            <param-name>noPurviewPath</param-name>
            <param-value>/sys/nopurview.jsp</param-value>
        </init-param>
    </filter>

	<filter-mapping>
        <filter-name>AuthenticationFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>

	<filter-mapping>
        <filter-name>AuthenticationFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>

	 <filter-mapping>
        <filter-name>hibernateFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>  
	
	<filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>

	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>*.jsp</url-pattern>
        <!-- These are needed by Tomcat 5 for forwards -->
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
	<listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>
   <listener>
      <listener-class>cn.com.xunuo.webapp.listener.StartupListener</listener-class>
   </listener>
   <!--  <listener>
      <listener-class>cn.com.ott.webapp.listener.UserCounterListener</listener-class>
   </listener> -->
 
  <!-- Standard Action Servlet Configuration -->
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>        
		<init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-sys.xml,/WEB-INF/struts-config-cms.xml,/WEB-INF/struts-config-index.xml,/WEB-INF/struts-config-info.xml,/WEB-INF/struts-config-news.xml,/WEB-INF/struts-config-fornt-info.xml,/WEB-INF/struts-config-lead.xml</param-value>
        </init-param>
		<load-on-startup>2</load-on-startup>
    </servlet>

      <!-- Front Controller Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>
  <!-- new servlet end -->
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
<!-- welcome-file-list -->
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>


  <taglib>
	<taglib-uri>/demotag</taglib-uri>
	<taglib-location>/WEB-INF/tlds/mytag.tld</taglib-location>

</taglib>
</web-app>
