<?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>Confluence</display-name>
    <description>Confluence Web App</description>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/databaseSubsystemContext.xml,
            classpath:/services/cacheServiceContext.xml,
            classpath:/services/bandanaServiceContext.xml,
            classpath:/services/eventServiceContext.xml,
            classpath:/services/pluginServiceContext.xml,
            classpath:/services/taskQueueServiceContext.xml,
            classpath:/services/permissionsServiceContext.xml,
            classpath:/applicationContext.xml,
            classpath:/i18NContext.xml,
            classpath:/securityContext.xml,
            classpath:/productionDatabaseContext.xml,
            classpath:/indexingSubsystemContext.xml,
            classpath:/searchSubsystemContext.xml,
            classpath:/rpcSubsystemContext.xml,
            classpath:/upgradeSubsystemContext.xml,
            classpath:/wikiSubsystemContext.xml,
            classpath:/wikiFiltersSubsystemContext.xml,
            classpath:/velocityContext.xml,
            classpath:/importExportSubsystemContext.xml,
            classpath:/schedulingSubsystemContext.xml,
            classpath:/atlassianUserContext.xml,
            classpath:/attachmentSubsystemContext.xml,
            classpath:/services/baseServiceContext.xml,
            classpath:/services/contentServiceContext.xml,
            classpath:/services/userServiceContext.xml,
            classpath:/services/statusServiceContext.xml,
            classpath:/com/atlassian/confluence/compatibility/compatibility-context.xml,
            classpath:/jmxContext.xml,
            classpath:/cacheProviderContext.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>contextClass</param-name>
        <param-value>com.atlassian.confluence.setup.ConfluenceXmlWebApplicationContext</param-value>
    </context-param>

    <!-- Uncomment the following to disable the space export long running task. -->
    <!--
        <context-param>
            <param-name>unsupportedContainersForExportLongRunningTask</param-name>
            <param-value>websphere,jboss</param-value>
        </context-param>
    -->

    <filter>
        <filter-name>header-sanitiser</filter-name>
        <filter-class>com.atlassian.core.filters.HeaderSanitisingFilter</filter-class>
    </filter>

    <filter>
        <filter-name>jmx</filter-name>
        <filter-class>com.atlassian.confluence.jmx.JmxFilter</filter-class>
    </filter>


    <filter>
        <filter-name>johnson</filter-name>
        <filter-class>com.atlassian.confluence.web.ConfluenceJohnsonFilter</filter-class>
    </filter>

    <filter>
        <filter-name>sessioninview</filter-name>
        <filter-class>com.atlassian.config.FlushingSpringSessionInViewFilterForHibernate</filter-class>
    </filter>

    <filter>
        <filter-name>login</filter-name>
        <filter-class>com.atlassian.seraph.filter.LoginFilter</filter-class>
    </filter>

    <filter>
        <filter-name>trustedapp</filter-name>
        <filter-class>com.atlassian.confluence.security.trust.seraph.ConfluenceTrustedApplicationsFilter</filter-class>
    </filter>

    <filter>
        <filter-name>requestcache</filter-name>
        <filter-class>com.atlassian.confluence.util.RequestCacheThreadLocalFilter</filter-class>
    </filter>


    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.atlassian.confluence.util.profiling.ProfilingPageFilter</filter-class>
    </filter>

    <filter>
        <filter-name>encoding</filter-name>
        <filter-class>com.atlassian.confluence.setup.ConfluenceEncodingFilter</filter-class>
    </filter>

    <filter>
        <filter-name>caching</filter-name>
        <filter-class>com.atlassian.confluence.web.filter.ConfluenceCachingFilter</filter-class>
    </filter>

    <filter>
        <filter-name>security</filter-name>
        <filter-class>com.atlassian.seraph.filter.SecurityFilter</filter-class>
    </filter>

    <filter>
        <filter-name>userthreadlocal</filter-name>
        <filter-class>com.atlassian.confluence.util.UserThreadLocalFilter</filter-class>
    </filter>

    <filter>
        <filter-name>servletcontextthreadlocal</filter-name>
        <filter-class>com.atlassian.core.filters.ServletContextThreadLocalFilter</filter-class>
    </filter>

    <filter>
        <filter-name>threadLocalCache</filter-name>
        <filter-class>com.atlassian.confluence.web.filter.ThreadLocalCacheFilter</filter-class>
    </filter>

    <filter>
        <filter-name>expires-one-hour</filter-name>
        <filter-class>com.atlassian.core.filters.ExpiresFilter</filter-class>
        <init-param>
            <!-- specify the which HTTP parameter to use to turn the filter on or off -->
            <!-- if not specified - defaults to "profile.filter" -->
            <param-name>expiryTimeInSeconds</param-name>
            <param-value>3600</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>thread-local-error-collection</filter-name>
        <filter-class>com.atlassian.confluence.util.ConfluenceErrorFilter</filter-class>
    </filter>

    <filter>
        <filter-name>profiling</filter-name>
        <filter-class>com.atlassian.confluence.util.profiling.ConfluenceProfilingFilter</filter-class>
        <init-param>
            <!-- specify the which HTTP parameter to use to turn the filter on or off -->
            <!-- if not specified - defaults to "profile.filter" -->
            <param-name>activate.param</param-name>
            <param-value>profile</param-value>
        </init-param>
        <init-param>
            <!-- specify the whether to start the filter automatically -->
            <!-- if not specified - defaults to "true" -->
            <param-name>autostart</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>AccessLogFilter</filter-name>
        <filter-class>com.atlassian.confluence.util.AccessLogFilter</filter-class>
    </filter>

    <filter>
        <filter-name>gzipFilter</filter-name>
        <filter-class>com.atlassian.confluence.util.zip.ConfluenceGzipFilter</filter-class>
    </filter>

    <filter>
        <filter-name>ClusterHeaderFilter</filter-name>
        <filter-class>com.atlassian.confluence.util.ClusterHeaderFilter</filter-class>
    </filter>

    <!-- this filter is used to rewrite through the /s/* filter to add caching headers. see: urlrewrite.xml -->
    <filter>
        <filter-name>UrlRewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    </filter>

    <filter>
        <filter-name>LoggingContextFilter</filter-name>
        <filter-class>com.atlassian.confluence.util.LoggingContextFilter</filter-class>
    </filter>

    <filter>
        <filter-name>RequestTimeFilter</filter-name>
        <filter-class>com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter</filter-class>
    </filter>

    <filter>
        <filter-name>filter-plugin-dispatcher-after-encoding</filter-name>
        <filter-class>com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter</filter-class>
        <init-param>
            <param-name>location</param-name>
            <param-value>after-encoding</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>filter-plugin-dispatcher-before-login</filter-name>
        <filter-class>com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter</filter-class>
        <init-param>
            <param-name>location</param-name>
            <param-value>before-login</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>filter-plugin-dispatcher-before-decoration</filter-name>
        <filter-class>com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter</filter-class>
        <init-param>
            <param-name>location</param-name>
            <param-value>before-decoration</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>filter-plugin-dispatcher-before-dispatch</filter-name>
        <filter-class>com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter</filter-class>
        <init-param>
            <param-name>location</param-name>
            <param-value>before-dispatch</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>header-sanitiser</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <!-- THIS MUST REMAIN AS THE TOP FILTER SO THAT THE ENCODING CAN BE SET BEFORE ANYTHING ELSE TOUCHES IT (well, except the header sanitiser)-->
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>filter-plugin-dispatcher-after-encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>caching</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

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

    <filter-mapping>
        <filter-name>UrlRewriteFilter</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/exportword</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>requestcache</filter-name>
        <url-pattern>/rpc/*</url-pattern>
    </filter-mapping>

    <!-- uncomment this mapping in order to log page views to the access log, see log4j.properties also -->
<!--
    <filter-mapping>
        <filter-name>AccessLogFilter</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
-->

    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>RequestTimeFilter</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>profiling</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <!--filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/rpc/*</url-pattern>
    </filter-mapping-->

    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sessioninview</filter-name>
        <url-pattern>/exportword</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>/download/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>johnson</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

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

    <filter-mapping>
        <filter-name>filter-plugin-dispatcher-before-login</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

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

    <!-- This must come after the login filter -->
    <filter-mapping>
        <filter-name>trustedapp</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

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

    <!-- Must go after seraph -->
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>/exportword</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>userthreadlocal</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/exportword</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/rpc/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>threadLocalCache</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

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

    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>/dwr/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>/rpc/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>servletcontextthreadlocal</filter-name>
        <url-pattern>/s/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>jmx</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>jmx</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>filter-plugin-dispatcher-before-decoration</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>*.vm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/display/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/label/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/rest/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>expires-one-hour</filter-name>
        <url-pattern>*.js</url-pattern>
    </filter-mapping>

    <!--<filter-mapping>
        <filter-name>expires-one-hour</filter-name>
        <url-pattern>*.css</url-pattern>
    </filter-mapping>-->

    <!-- the following plugin filter should be the last one in the chain -->
    <filter-mapping>
        <filter-name>filter-plugin-dispatcher-before-dispatch</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <!-- ============================================================ -->
    <!-- Servlet Context Listeners (Executed on app startup/shutdown) -->
    <!-- ============================================================ -->

    <!-- Cleans up JavaBeans introspection caches on app shutdown, so that the classes and classloaders can be
         garbage-collected properly -->
    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>

    <!-- Load initial minimal configuration and bootstrap the application ready for setup -->
    <listener>
        <listener-class>com.atlassian.confluence.setup.ConfluenceConfigurationListener</listener-class>
    </listener>

    <!-- Bring up the rest of the application if it is already set up -->
    <listener>
        <listener-class>com.atlassian.config.bootstrap.BootstrappedContextLoaderListener</listener-class>
    </listener>

    <!-- Check for the confluence.i18n.reloadbundles system property. If set, do not cache the localized
    .properties files. -->
    <listener>
        <listener-class>com.atlassian.confluence.languages.ReloadBundlesContextListener</listener-class>
    </listener>

    <!-- Upgrades must have been performed before we run the lifecycle plugins, or the plugin manager won't
         be started -->
    <listener>
	    <listener-class>com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener</listener-class>
    </listener>

    <!-- Perform remaining configured lifecycle events, if the application is set up -->
    <listener>
        <listener-class>com.atlassian.config.lifecycle.LifecycleServletContextListener</listener-class>
    </listener>

    <!-- ===================================== -->
    <!-- Other (non servlet-context) listeners -->
    <!-- ===================================== -->

    <listener>
        <listener-class>com.atlassian.confluence.user.listeners.UserSessionExpiryListener</listener-class>
    </listener>

    <!-- ======== -->
    <!-- Servlets -->
    <!-- ======== -->

    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.ConfluenceServletDispatcher</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>velocity</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.ConfluenceVelocityServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>simple-display</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SpringManagedServlet</servlet-class>
        <init-param>
            <param-name>springComponentName</param-name>
            <param-value>simpleDisplayServlet</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>tiny-url</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.TinyUrlServlet</servlet-class>
        <load-on-startup>3</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>file-server</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.FileServerServlet</servlet-class>
        <load-on-startup>4</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>xmlrpc</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SpringManagedServlet</servlet-class>
        <init-param>
            <param-name>springComponentName</param-name>
            <param-value>xmlRpcServer</param-value>
        </init-param>
        <load-on-startup>6</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>trackback</servlet-name>
        <servlet-class>com.atlassian.trackback.TrackbackListenerServlet</servlet-class>
        <init-param>
            <param-name>trackbackStore</param-name>
            <param-value>com.atlassian.confluence.links.persistence.ConfluenceTrackbackStore</param-value>
        </init-param>
        <load-on-startup>7</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>glue-soap</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SpringManagedServlet</servlet-class>
        <init-param>
            <param-name>springComponentName</param-name>
            <param-value>glueSoapServer</param-value>
        </init-param>
        <load-on-startup>8</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>axis-soap</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SpringManagedServlet</servlet-class>
        <init-param>
            <param-name>springComponentName</param-name>
            <param-value>axisSoapServer</param-value>
        </init-param>
        <load-on-startup>8</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>servlet-module-container-servlet</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.ServletModuleContainerServlet</servlet-class>
        <load-on-startup>9</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>css</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.CssServlet</servlet-class>
        <load-on-startup>10</load-on-startup>
    </servlet>

    <!-- Keep this servlet as the last to load -->
    <servlet>
        <servlet-name>final-servlet</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.ReadyToServeServlet</servlet-class>
        <load-on-startup>100</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>dwr-invoker</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SetupCheckingDwrServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>maxCallCount</param-name>
            <param-value>5</param-value>
        </init-param>
        <init-param>
            <param-name>url:/interface</param-name>
            <param-value>com.atlassian.confluence.servlet.ConfluenceInterfaceHandler</param-value>
        </init-param>
    </servlet>

    <servlet>
        <servlet-name>labels</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.LabelServlet</servlet-class>
    </servlet>

    <servlet>
      <servlet-name>jcaptcha</servlet-name>
      <servlet-class>com.atlassian.confluence.servlet.ImageCaptchaServlet</servlet-class>
      <load-on-startup>0</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>exportword</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.SpringManagedServlet</servlet-class>
        <init-param>
            <param-name>springComponentName</param-name>
            <param-value>exportWordPageServer</param-value>
        </init-param>
    </servlet>

    <!-- Dummy servlet for CONF-7953. Used for mapping URLs which have no target servlet but need to be filtered -->
    <servlet>
        <servlet-name>noop</servlet-name>
        <servlet-class>com.atlassian.confluence.servlet.ConfluenceNoOpServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>

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

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.action</url-pattern>
    </servlet-mapping>

    <!--
         we pretty much have to map all CSS files to the action servlet, as a result
         of a fun collaboration of an IE bug, and the short-sightedness of the servlet
         spec.
    -->
    <servlet-mapping>
        <servlet-name>css</servlet-name>
        <url-pattern>*.css</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>velocity</servlet-name>
        <url-pattern>*.vm</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>simple-display</servlet-name>
        <url-pattern>/display/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tiny-url</servlet-name>
        <url-pattern>/x/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>file-server</servlet-name>
        <url-pattern>/download/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>xmlrpc</servlet-name>
        <url-pattern>/rpc/xmlrpc</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>trackback</servlet-name>
        <url-pattern>/rpc/trackback/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>glue-soap</servlet-name>
        <url-pattern>/rpc/soap/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>glue-soap</servlet-name>
        <url-pattern>/rpc/soap-glue/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>axis-soap</servlet-name>
        <url-pattern>/rpc/soap-axis/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>servlet-module-container-servlet</servlet-name>
        <url-pattern>/plugins/servlet/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>labels</servlet-name>
        <url-pattern>/label/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
      <servlet-name>jcaptcha</servlet-name>
      <url-pattern>/jcaptcha/*</url-pattern>
    </servlet-mapping>

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

    <servlet-mapping>
        <servlet-name>noop</servlet-name>
        <url-pattern>/s/*</url-pattern>
    </servlet-mapping>

    <!--
    Noop filter mapping for the trusted app certificate which is serviced exclusively by the Seraph trusted app filter.
    This servlet mapping is necessary for Websphere 6.1 which still likes to forward the request to a servlet even if
    the filter chain is not fully followed.
    -->
    <servlet-mapping>
        <servlet-name>noop</servlet-name>
        <url-pattern>/admin/appTrustCertificate</url-pattern>
    </servlet-mapping>

    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>

    <!-- redirect all 500 errors to confluence error page -->
    <error-page>
        <error-code>500</error-code>
        <location>/500page.jsp</location>
    </error-page>

    <error-page>
        <error-code>404</error-code>
        <location>/fourohfour.action</location>
    </error-page>

</web-app>
