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

  <display-name>susimail</display-name>
  <servlet>
    <servlet-name>SusiMail</servlet-name>
    <servlet-class>i2p.susi.webmail.WebMail</servlet-class>
    <multipart-config>
      <!-- 7.27 MB. See SMTPClient for discussion -->
      <max-file-size>7629902</max-file-size>
      <max-request-size>7629902</max-request-size>
      <file-size-threshold>131072</file-size-threshold>
    </multipart-config>
  </servlet>

  <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>SusiMail</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>SusiMail</servlet-name>
    <!-- old location /susimail/susimail -->
    <url-pattern>/susimail</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>SusiMail</servlet-name>
    <!-- empty pattern handles the root -->
    <url-pattern></url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>SusiMail</servlet-name>
    <url-pattern>/index</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>SusiMail</servlet-name>
    <url-pattern>/index.jsp</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>SusiMail</servlet-name>
    <url-pattern>/index.html</url-pattern>
  </servlet-mapping>

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

  <session-config>
    <session-timeout>1440</session-timeout>
    <cookie-config>
      <http-only>true</http-only>
    </cookie-config>
  </session-config>
  <!-- tomcat (untested) -->
  <context-param>
    <param-name>crossContext</param-name>
    <param-value>false</param-value>
  </context-param>
  <!-- jetty
    -  This is required so the same session ID isn't shared with
    -  the base context. When shared, it's expired after 30 minutes
    -  in the base context which invalidates it in our context too.
    -->
  <context-param>
    <param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
    <param-value>SUSIMAILJSESSIONID</param-value>
  </context-param>

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