whoops
[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>etc/config.properties</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>etc/config.properties</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>
49             Mir
50         </servlet-name>
51         <url-pattern>
52             /servlet/Mir
53         </url-pattern>
54     </servlet-mapping>
55
56     <servlet-mapping>
57         <servlet-name>OpenMir</servlet-name>
58         <url-pattern>/OpenMir</url-pattern>
59     </servlet-mapping>
60     <servlet-mapping>
61         <servlet-name>OpenMir</servlet-name>
62         <url-pattern>/servlet/OpenMir</url-pattern>
63     </servlet-mapping>
64
65     <mime-mapping>
66       <extension>
67         mp3 
68       </extension>
69       <mime-type>
70         audio/x-mp3
71       </mime-type>
72     </mime-mapping>
73     <mime-mapping>
74       <extension>
75         ra
76       </extension>
77       <mime-type>
78         audio/vnd.rn-realaudio
79       </mime-type>
80     </mime-mapping>
81     <mime-mapping>
82       <extension>
83         rm
84       </extension>
85       <mime-type>
86         application/vnd.rn-realmedia
87       </mime-type>
88     </mime-mapping>
89     <mime-mapping>
90       <extension>
91         mov
92       </extension>
93       <mime-type>
94         video/quicktime 
95       </mime-type>
96     </mime-mapping>
97     <mime-mapping>
98       <extension>
99         mpg
100       </extension>
101       <mime-type>
102         video/mpeg
103       </mime-type>
104     </mime-mapping>
105     <mime-mapping>
106       <extension>
107         avi
108       </extension>
109       <mime-type>
110         video/x-msvideo
111       </mime-type>
112     </mime-mapping>
113     <mime-mapping>
114       <extension>
115         asf
116       </extension>
117       <mime-type>
118         video/x-ms-asf
119       </mime-type>
120     </mime-mapping>
121     <mime-mapping>
122       <extension>
123         pdf
124       </extension>
125       <mime-type>
126         application/pdf
127       </mime-type>
128     </mime-mapping>
129
130     <security-constraint>
131       <web-resource-collection>
132          <web-resource-name>Protected Area</web-resource-name>
133          <!-- Define the context-relative URL(s) to be protected -->
134          <url-pattern>/jsp/security/protected/*</url-pattern>
135          <!-- If you list http methods, only those methods are protected -->
136          <http-method>DELETE</http-method>
137          <http-method>GET</http-method>
138          <http-method>POST</http-method>
139          <http-method>PUT</http-method>
140       </web-resource-collection>
141       <auth-constraint>
142          <!-- Anyone with one of the listed roles may access this area -->
143          <role-name>tomcat</role-name>
144          <role-name>role1</role-name>
145       </auth-constraint>
146     </security-constraint>
147
148     <!-- Default login configuration uses BASIC authentication -->
149     <!--
150     <login-config>
151       <auth-method>BASIC</auth-method>
152       <realm-name>Example Basic Authentication Area</realm-name>
153     </login-config>
154     -->
155
156     <!-- Form-based login is enabled by default.  If you wish to
157          try Basic authentication, comment out the <login-config>
158          section below and uncomment the one above. -->
159     <login-config>
160       <auth-method>FORM</auth-method>
161       <realm-name>Example Form-Based Authentication Area</realm-name>
162       <form-login-config>
163         <form-login-page>/jsp/security/login/login.jsp</form-login-page>
164         <form-error-page>/jsp/security/login/error.jsp</form-error-page>
165       </form-login-config>
166     </login-config>
167
168 </web-app>