<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
    <display-name>Openfire</display-name>

    <!--  OF-902 use HttpOnly for session cookie -->
    <session-config>
	 <cookie-config>
	  <http-only>true</http-only>
	 </cookie-config>
	</session-config>

    <!-- prevent URL rewritting with jsessionid included, OF-669 -->
    <context-param>
        <param-name>org.eclipse.jetty.servlet.SessionIdPathParameterName</param-name>
        <param-value>none</param-value>
    </context-param>

    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>openfire_i18n</param-value>
    </context-param>

    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
        <param-value>zh_CN</param-value>
    </context-param>

    <filter>
        <filter-name>AuthCheck</filter-name>
        <filter-class>org.jivesoftware.admin.AuthCheckFilter</filter-class>
        <init-param>
            <param-name>excludes</param-name>
            <param-value>
                login.jsp,index.jsp?logout=true,setup/index.jsp,setup/setup-*,.gif,.png,error-serverdown.jsp
            </param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>PluginFilter</filter-name>
        <filter-class>org.jivesoftware.admin.PluginFilter</filter-class>
    </filter>

    <filter>
        <filter-name>Set Character Encoding</filter-name>
        <filter-class>org.jivesoftware.util.SetCharacterEncodingFilter</filter-class>
    </filter>

    <filter>
        <filter-name>LocaleFilter</filter-name>
        <filter-class>org.jivesoftware.util.LocaleFilter</filter-class>
    </filter>

    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
    </filter>

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

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

    <filter-mapping>
        <filter-name>Set Character Encoding</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>

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

    <filter-mapping>
        <filter-name>AuthCheck</filter-name>
        <servlet-name>PluginServlet</servlet-name>
    </filter-mapping>

    <filter-mapping>
        <filter-name>PluginFilter</filter-name>
        <servlet-name>PluginServlet</servlet-name>
    </filter-mapping>

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

    <filter-mapping>
        <filter-name>AuthCheck</filter-name>
        <servlet-name>dwr-invoker</servlet-name>
    </filter-mapping>


    <listener>
        <listener-class>org.jivesoftware.openfire.XMPPContextListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>PluginServlet</servlet-name>
        <servlet-class>org.jivesoftware.openfire.container.PluginServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>FaviconServlet</servlet-name>
        <servlet-class>org.jivesoftware.util.FaviconServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>dwr-invoker</servlet-name>
        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>PluginIconServlet</servlet-name>
        <servlet-class>org.jivesoftware.openfire.container.PluginIconServlet</servlet-class>
    </servlet>

    <!--<servlet>
        <servlet-name>WebDAVLiteServlet</servlet-name>
        <servlet-class>org.jivesoftware.openfire.webdav.WebDAVLiteServlet</servlet-class>
    </servlet>-->


    <!--@@JSPC-SERVLETS@@-->

    <servlet-mapping>
        <servlet-name>PluginServlet</servlet-name>
        <url-pattern>/plugins/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>FaviconServlet</servlet-name>
        <url-pattern>/getFavicon</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>PluginIconServlet</servlet-name>
        <url-pattern>/geticon</url-pattern>
    </servlet-mapping>

    <!--<servlet-mapping>
        <servlet-name>WebDAVLiteServlet</servlet-name>
        <url-pattern>/webdav/*</url-pattern>
    </servlet-mapping>-->

    <servlet-mapping>
        <servlet-name>dwr-invoker</servlet-name>
        <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>

</web-app>


