first cut of merge of STABLE-pre1_0 into HEAD. I won't even guarantee that it
[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>
24         <servlet-name>
25             OpenMir
26         </servlet-name>
27         <servlet-class>
28             OpenMir
29         </servlet-class>
30
31         <init-param>
32             <param-name>Config</param-name>
33             <param-value>config</param-value>
34         </init-param>
35
36     </servlet>
37
38     <servlet-mapping>
39         <servlet-name>
40             Mir
41         </servlet-name>
42         <url-pattern>
43             /Mir
44         </url-pattern>
45     </servlet-mapping>
46
47     <servlet-mapping>
48         <servlet-name>OpenMir</servlet-name>
49         <url-pattern>/OpenMir</url-pattern>
50     </servlet-mapping>
51
52
53     <taglib>
54         <taglib-uri>
55            http://java.apache.org/tomcat/examples-taglib
56         </taglib-uri>
57         <taglib-location>
58            /WEB-INF/jsp/example-taglib.tld
59         </taglib-location>
60     </taglib>
61
62     <security-constraint>
63       <web-resource-collection>
64          <web-resource-name>Protected Area</web-resource-name>
65          <!-- Define the context-relative URL(s) to be protected -->
66          <url-pattern>/jsp/security/protected/*</url-pattern>
67          <!-- If you list http methods, only those methods are protected -->
68          <http-method>DELETE</http-method>
69          <http-method>GET</http-method>
70          <http-method>POST</http-method>
71          <http-method>PUT</http-method>
72       </web-resource-collection>
73       <auth-constraint>
74          <!-- Anyone with one of the listed roles may access this area -->
75          <role-name>tomcat</role-name>
76          <role-name>role1</role-name>
77       </auth-constraint>
78     </security-constraint>
79
80     <!-- Default login configuration uses BASIC authentication -->
81     <!--
82     <login-config>
83       <auth-method>BASIC</auth-method>
84       <realm-name>Example Basic Authentication Area</realm-name>
85     </login-config>
86     -->
87
88     <!-- Form-based login is enabled by default.  If you wish to
89          try Basic authentication, comment out the <login-config>
90          section below and uncomment the one above. -->
91     <login-config>
92       <auth-method>FORM</auth-method>
93       <realm-name>Example Form-Based Authentication Area</realm-name>
94       <form-login-config>
95         <form-login-page>/jsp/security/login/login.jsp</form-login-page>
96         <form-error-page>/jsp/security/login/error.jsp</form-error-page>
97       </form-login-config>
98     </login-config>
99
100 </web-app>