source: apps/imagegen/imagegen/webapp/src/main/webapp/WEB-INF/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: 2.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
4         version="3.0">
5    <display-name>WebAppExample - Identicon</display-name>
6
7    <servlet>
8     <servlet-name>net.i2p.imagegen.IdenticonServlet</servlet-name>
9     <servlet-class>net.i2p.imagegen.IdenticonServlet</servlet-class>
10     <load-on-startup>1</load-on-startup>
11    </servlet>
12
13    <servlet>
14     <servlet-name>net.i2p.imagegen.QRServlet</servlet-name>
15     <servlet-class>net.i2p.imagegen.QRServlet</servlet-class>
16     <load-on-startup>1</load-on-startup>
17    </servlet>
18     
19    <servlet>
20     <servlet-name>net.i2p.imagegen.RandomArtServlet</servlet-name>
21     <servlet-class>net.i2p.imagegen.RandomArtServlet</servlet-class>
22     <load-on-startup>1</load-on-startup>
23    </servlet>
24
25    <servlet>
26      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
27      <servlet-class>net.i2p.servlet.ErrorServlet</servlet-class>
28      <init-param>
29        <param-name>name</param-name>
30        <param-value>imagegen</param-value>
31      </init-param>
32    </servlet>
33
34    <!-- precompiled servlets -->
35   
36    <servlet-mapping> 
37      <servlet-name>net.i2p.imagegen.IdenticonServlet</servlet-name>
38      <url-pattern>/id</url-pattern>
39    </servlet-mapping>
40   
41    <servlet-mapping> 
42      <servlet-name>net.i2p.imagegen.QRServlet</servlet-name>
43      <url-pattern>/qr</url-pattern>
44    </servlet-mapping>
45   
46    <servlet-mapping> 
47      <servlet-name>net.i2p.imagegen.RandomArtServlet</servlet-name>
48      <url-pattern>/ra</url-pattern>
49    </servlet-mapping>
50
51    <servlet-mapping>
52      <servlet-name>net.i2p.servlet.ErrorServlet</servlet-name>
53      <url-pattern>/error</url-pattern>
54    </servlet-mapping>
55     
56   
57    <!-- this webapp doesn't actually use sessions or cookies -->
58    <session-config>
59        <session-timeout>
60            30
61        </session-timeout>
62        <cookie-config>
63            <http-only>true</http-only>
64        </cookie-config>
65    </session-config>
66
67    <error-page>
68        <error-code>403</error-code>
69        <location>/error</location>
70    </error-page>
71    <error-page>
72        <error-code>404</error-code>
73        <location>/error</location>
74    </error-page>
75    <error-page>
76        <error-code>500</error-code>
77        <location>/error</location>
78    </error-page>
79
80</web-app>
Note: See TracBrowser for help on using the repository browser.