source: apps/i2psnark/web.xml @ 2aceca5

Last change on this file since 2aceca5 was 2aceca5, checked in by zzz <zzz@…>, 2 years ago

Console: Add error handler to all webapps (ticket #2155)
Fix up default servlet handling in i2ptunnel and susidns

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE web-app
3    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
4    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
5
6<web-app>
7    <filter>
8        <filter-name>XSSFilter</filter-name>
9        <filter-class>net.i2p.servlet.filters.XSSFilter</filter-class>
10    </filter>
11    <filter-mapping>
12        <filter-name>XSSFilter</filter-name>
13        <url-pattern>/*</url-pattern>
14    </filter-mapping>
15
16    <servlet>
17     <servlet-name>org.klomp.snark.web.I2PSnarkServlet</servlet-name>
18     <servlet-class>org.klomp.snark.web.I2PSnarkServlet</servlet-class>
19     <load-on-startup>1</load-on-startup>
20    </servlet>
21
22    <servlet>
23      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
24      <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
25      <init-param>
26        <param-name>name</param-name>
27        <param-value>I2PSnark</param-value>
28      </init-param>
29    </servlet>
30     
31    <!-- precompiled servlets -->
32   
33    <servlet-mapping> 
34      <servlet-name>org.klomp.snark.web.I2PSnarkServlet</servlet-name>
35      <url-pattern>/</url-pattern>
36    </servlet-mapping>
37
38    <servlet-mapping>
39      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
40      <url-pattern>/.error</url-pattern>
41    </servlet-mapping>
42   
43    <!-- this webapp doesn't actually use sessions or cookies -->
44    <session-config>
45        <session-timeout>
46            30
47        </session-timeout>
48        <cookie-config>
49            <http-only>true</http-only>
50        </cookie-config>
51    </session-config>
52
53    <error-page>
54        <error-code>403</error-code>
55        <location>/.error</location>
56    </error-page>
57    <error-page>
58        <error-code>404</error-code>
59        <location>/.error</location>
60    </error-page>
61    <error-page>
62        <error-code>500</error-code>
63        <location>/.error</location>
64    </error-page>
65</web-app>
Note: See TracBrowser for help on using the repository browser.