<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

<web-app>
    <filter>
        <filter-name>XSSFilter</filter-name>
        <filter-class>net.i2p.servlet.filters.XSSFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>XSSFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet>
      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
      <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
      <init-param>
        <param-name>name</param-name>
        <param-value>Hidden Services Manager</param-value>
      </init-param>
    </servlet>

    <!-- precompiled servlets -->

    <!-- yeah we could do this in a handler but this is easier -->
    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
        <!-- empty pattern handles the root -->
        <url-pattern></url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
        <url-pattern>/index</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
        <url-pattern>/index.html</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
        <!-- POST target -->
        <url-pattern>/list</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name>
        <url-pattern>/list.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.edit_jsp</servlet-name>
        <url-pattern>/edit</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.wizard_jsp</servlet-name>
        <url-pattern>/wizard</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.register_jsp</servlet-name>
        <url-pattern>/register</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>net.i2p.i2ptunnel.jsp.ssl_jsp</servlet-name>
        <url-pattern>/ssl</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
      <url-pattern>/error</url-pattern>
    </servlet-mapping>

    <!-- this webapp doesn't actually use sessions or cookies -->
    <session-config>
        <session-timeout>
            30
        </session-timeout>
        <cookie-config>
            <http-only>true</http-only>
        </cookie-config>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

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