source: nutchez-0.1/tomcat/webapps/examples/WEB-INF/web.xml @ 165

Last change on this file since 165 was 66, checked in by waue, 16 years ago

NutchEz - an easy way to nutch

File size: 10.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4  contributor license agreements.  See the NOTICE file distributed with
5  this work for additional information regarding copyright ownership.
6  The ASF licenses this file to You under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with
8  the License.  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17-->
18
19<web-app xmlns="http://java.sun.com/xml/ns/javaee"
20   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
22   version="2.5"> 
23
24    <description>
25      Servlet and JSP Examples.
26    </description>
27    <display-name>Servlet and JSP Examples</display-name>
28
29
30    <!-- Define servlet-mapped and path-mapped example filters -->
31    <filter>
32        <filter-name>Servlet Mapped Filter</filter-name>
33        <filter-class>filters.ExampleFilter</filter-class>
34  <init-param>
35      <param-name>attribute</param-name>
36      <param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
37  </init-param>
38    </filter>
39    <filter>
40        <filter-name>Path Mapped Filter</filter-name>
41        <filter-class>filters.ExampleFilter</filter-class>
42  <init-param>
43      <param-name>attribute</param-name>
44      <param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
45  </init-param>
46    </filter>
47    <filter>
48        <filter-name>Request Dumper Filter</filter-name>
49        <filter-class>filters.RequestDumperFilter</filter-class>
50    </filter>
51
52    <!-- Example filter to set character encoding on each request -->
53    <filter>
54        <filter-name>Set Character Encoding</filter-name>
55        <filter-class>filters.SetCharacterEncodingFilter</filter-class>
56        <init-param>
57            <param-name>encoding</param-name>
58            <param-value>EUC_JP</param-value>
59        </init-param>
60    </filter>
61
62    <filter>
63        <filter-name>Compression Filter</filter-name>
64        <filter-class>compressionFilters.CompressionFilter</filter-class>
65
66        <init-param>
67          <param-name>compressionThreshold</param-name>
68          <param-value>10</param-value>
69        </init-param>
70        <init-param>
71          <param-name>debug</param-name>
72          <param-value>0</param-value>
73        </init-param>
74    </filter>
75
76    <!-- Define filter mappings for the defined filters -->
77    <filter-mapping>
78        <filter-name>Servlet Mapped Filter</filter-name>
79  <servlet-name>invoker</servlet-name>
80    </filter-mapping>
81    <filter-mapping>
82        <filter-name>Path Mapped Filter</filter-name>
83  <url-pattern>/servlet/*</url-pattern>
84    </filter-mapping>
85
86<!-- Example filter mapping to apply the "Set Character Encoding" filter
87     to *all* requests processed by this web application -->
88<!--
89    <filter-mapping>
90        <filter-name>Set Character Encoding</filter-name>
91        <url-pattern>/*</url-pattern>
92    </filter-mapping>
93-->
94
95<!--
96    <filter-mapping>
97      <filter-name>Compression Filter</filter-name>
98      <url-pattern>/CompressionTest</url-pattern>
99    </filter-mapping>
100-->
101
102<!--
103    <filter-mapping>
104        <filter-name>Request Dumper Filter</filter-name>
105        <url-pattern>/*</url-pattern>
106    </filter-mapping>
107-->
108
109    <!-- Define example application events listeners -->
110    <listener>
111        <listener-class>listeners.ContextListener</listener-class>
112    </listener>
113    <listener>
114        <listener-class>listeners.SessionListener</listener-class>
115    </listener>
116
117    <!-- Define servlets that are included in the example application -->
118
119    <servlet>
120      <servlet-name>servletToJsp</servlet-name>
121      <servlet-class>servletToJsp</servlet-class>
122    </servlet>
123    <servlet>
124        <servlet-name>ChatServlet</servlet-name>
125        <servlet-class>chat.ChatServlet</servlet-class>
126    </servlet>
127    <servlet>
128        <servlet-name>CompressionFilterTestServlet</servlet-name>
129        <servlet-class>compressionFilters.CompressionFilterTestServlet</servlet-class>
130    </servlet>
131    <servlet>
132        <servlet-name>HelloWorldExample</servlet-name>
133        <servlet-class>HelloWorldExample</servlet-class>
134    </servlet>
135    <servlet>
136        <servlet-name>RequestInfoExample</servlet-name>
137        <servlet-class>RequestInfoExample</servlet-class>
138    </servlet>
139    <servlet>
140        <servlet-name>RequestHeaderExample</servlet-name>
141        <servlet-class>RequestHeaderExample</servlet-class>
142    </servlet>
143    <servlet>
144        <servlet-name>RequestParamExample</servlet-name>
145        <servlet-class>RequestParamExample</servlet-class>
146    </servlet>
147    <servlet>
148        <servlet-name>CookieExample</servlet-name>
149        <servlet-class>CookieExample</servlet-class>
150    </servlet>
151    <servlet>
152        <servlet-name>SessionExample</servlet-name>
153        <servlet-class>SessionExample</servlet-class>
154    </servlet>
155
156    <servlet-mapping>
157        <servlet-name>ChatServlet</servlet-name>
158        <url-pattern>/jsp/chat/chat</url-pattern>
159    </servlet-mapping>
160    <servlet-mapping>
161        <servlet-name>CompressionFilterTestServlet</servlet-name>
162        <url-pattern>/CompressionTest</url-pattern>
163    </servlet-mapping>
164    <servlet-mapping>
165        <servlet-name>HelloWorldExample</servlet-name>
166        <url-pattern>/servlets/servlet/HelloWorldExample</url-pattern>
167    </servlet-mapping>
168    <servlet-mapping>
169        <servlet-name>RequestInfoExample</servlet-name>
170        <url-pattern>/servlets/servlet/RequestInfoExample/*</url-pattern>
171    </servlet-mapping>
172    <servlet-mapping>
173        <servlet-name>RequestHeaderExample</servlet-name>
174        <url-pattern>/servlets/servlet/RequestHeaderExample</url-pattern>
175    </servlet-mapping>
176    <servlet-mapping>
177        <servlet-name>RequestParamExample</servlet-name>
178        <url-pattern>/servlets/servlet/RequestParamExample</url-pattern>
179    </servlet-mapping>
180    <servlet-mapping>
181        <servlet-name>CookieExample</servlet-name>
182        <url-pattern>/servlets/servlet/CookieExample</url-pattern>
183    </servlet-mapping>
184    <servlet-mapping>
185        <servlet-name>SessionExample</servlet-name>
186        <url-pattern>/servlets/servlet/SessionExample</url-pattern>
187    </servlet-mapping>
188    <servlet-mapping>
189        <servlet-name>servletToJsp</servlet-name>
190        <url-pattern>/servletToJsp</url-pattern>
191    </servlet-mapping>
192
193    <jsp-config>
194        <taglib>
195      <taglib-uri>
196         http://jakarta.apache.org/tomcat/debug-taglib
197      </taglib-uri>
198      <taglib-location>
199         /WEB-INF/jsp/debug-taglib.tld
200      </taglib-location>
201  </taglib>
202
203  <taglib>
204      <taglib-uri>
205         http://jakarta.apache.org/tomcat/examples-taglib
206      </taglib-uri>
207      <taglib-location>
208         /WEB-INF/jsp/example-taglib.tld
209      </taglib-location>
210  </taglib>
211
212  <taglib>
213      <taglib-uri>
214         http://jakarta.apache.org/tomcat/jsp2-example-taglib
215      </taglib-uri>
216      <taglib-location>
217         /WEB-INF/jsp2/jsp2-example-taglib.tld
218      </taglib-location>
219  </taglib>
220
221  <jsp-property-group>
222      <description>
223    Special property group for JSP Configuration JSP example.
224      </description>
225      <display-name>JSPConfiguration</display-name>
226      <url-pattern>/jsp2/misc/config.jsp</url-pattern>
227      <el-ignored>true</el-ignored>
228      <page-encoding>ISO-8859-1</page-encoding>
229      <scripting-invalid>true</scripting-invalid>
230      <include-prelude>/jsp2/misc/prelude.jspf</include-prelude>
231      <include-coda>/jsp2/misc/coda.jspf</include-coda>
232  </jsp-property-group>
233    </jsp-config>
234   
235   <security-constraint>
236      <display-name>Example Security Constraint</display-name>
237      <web-resource-collection>
238         <web-resource-name>Protected Area</web-resource-name>
239   <!-- Define the context-relative URL(s) to be protected -->
240         <url-pattern>/jsp/security/protected/*</url-pattern>
241   <!-- If you list http methods, only those methods are protected -->
242   <http-method>DELETE</http-method>
243         <http-method>GET</http-method>
244         <http-method>POST</http-method>
245   <http-method>PUT</http-method>
246      </web-resource-collection>
247      <auth-constraint>
248         <!-- Anyone with one of the listed roles may access this area -->
249         <role-name>tomcat</role-name>
250   <role-name>role1</role-name>
251      </auth-constraint>
252    </security-constraint>
253
254    <!-- Default login configuration uses form-based authentication -->
255    <login-config>
256      <auth-method>FORM</auth-method>
257      <realm-name>Example Form-Based Authentication Area</realm-name>
258      <form-login-config>
259        <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
260        <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
261      </form-login-config>
262    </login-config>
263       
264    <!-- Security roles referenced by this web application -->
265    <security-role>
266      <role-name>role1</role-name>
267    </security-role>
268    <security-role>
269      <role-name>tomcat</role-name>
270    </security-role>   
271
272    <!-- Environment entry examples -->
273    <!--env-entry>
274      <env-entry-description>
275         The maximum number of tax exemptions allowed to be set.
276      </env-entry-description>
277      <env-entry-name>maxExemptions</env-entry-name>
278      <env-entry-type>java.lang.Integer</env-entry-type>
279      <env-entry-value>15</env-entry-value>
280    </env-entry-->
281    <env-entry>
282      <env-entry-name>minExemptions</env-entry-name>
283      <env-entry-type>java.lang.Integer</env-entry-type>
284      <env-entry-value>1</env-entry-value>
285    </env-entry>
286    <env-entry>
287      <env-entry-name>foo/name1</env-entry-name>
288      <env-entry-type>java.lang.String</env-entry-type>
289      <env-entry-value>value1</env-entry-value>
290    </env-entry>
291    <env-entry>
292      <env-entry-name>foo/bar/name2</env-entry-name>
293      <env-entry-type>java.lang.Boolean</env-entry-type>
294      <env-entry-value>true</env-entry-value>
295    </env-entry>
296    <env-entry>
297      <env-entry-name>name3</env-entry-name>
298      <env-entry-type>java.lang.Integer</env-entry-type>
299      <env-entry-value>1</env-entry-value>
300    </env-entry>
301    <env-entry>
302      <env-entry-name>foo/name4</env-entry-name>
303      <env-entry-type>java.lang.Integer</env-entry-type>
304      <env-entry-value>10</env-entry-value>
305    </env-entry>
306
307</web-app>
Note: See TracBrowser for help on using the repository browser.