Initial revision
[mir.git] / etc / web.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <!DOCTYPE web-app
4     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
5     "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
6
7 <web-app>
8     <servlet>
9         <servlet-name>
10             Mir
11         </servlet-name>
12         <servlet-class>
13             Mir
14         </servlet-class>
15
16         <init-param>
17             <param-name>Config</param-name>
18             <param-value>config</param-value>
19         </init-param>
20
21     </servlet>
22
23     <servlet-mapping>
24         <servlet-name>
25             Mir
26         </servlet-name>
27         <url-pattern>
28             Mir
29         </url-pattern>
30     </servlet-mapping>
31
32
33
34
35     <servlet>
36         <servlet-name>
37             OpenMir
38         </servlet-name>
39         <servlet-class>
40             OpenMir
41         </servlet-class>
42
43         <init-param>
44             <param-name>Config</param-name>
45             <param-value>config</param-value>
46         </init-param>
47
48     </servlet>
49
50     <servlet-mapping>
51         <servlet-name>OpenMir</servlet-name>
52         <url-pattern>OpenMir</url-pattern>
53     </servlet-mapping>
54
55
56     <taglib>
57         <taglib-uri>
58            http://java.apache.org/tomcat/examples-taglib
59         </taglib-uri>
60         <taglib-location>
61            /WEB-INF/jsp/example-taglib.tld
62         </taglib-location>
63     </taglib>
64
65     <security-constraint>
66       <web-resource-collection>
67          <web-resource-name>Protected Area</web-resource-name>
68          <!-- Define the context-relative URL(s) to be protected -->
69          <url-pattern>/jsp/security/protected/*</url-pattern>
70          <!-- If you list http methods, only those methods are protected -->
71          <http-method>DELETE</http-method>
72          <http-method>GET</http-method>
73          <http-method>POST</http-method>
74          <http-method>PUT</http-method>
75       </web-resource-collection>
76       <auth-constraint>
77          <!-- Anyone with one of the listed roles may access this area -->
78          <role-name>tomcat</role-name>
79          <role-name>role1</role-name>
80       </auth-constraint>
81     </security-constraint>
82
83     <!-- Default login configuration uses BASIC authentication -->
84     <!--
85     <login-config>
86       <auth-method>BASIC</auth-method>
87       <realm-name>Example Basic Authentication Area</realm-name>
88     </login-config>
89     -->
90
91     <!-- Form-based login is enabled by default.  If you wish to
92          try Basic authentication, comment out the <login-config>
93          section below and uncomment the one above. -->
94     <login-config>
95       <auth-method>FORM</auth-method>
96       <realm-name>Example Form-Based Authentication Area</realm-name>
97       <form-login-config>
98         <form-login-page>/jsp/security/login/login.jsp</form-login-page>
99         <form-error-page>/jsp/security/login/error.jsp</form-error-page>
100       </form-login-config>
101     </login-config>
102
103 </web-app>