source: main/trunk/greenstone3/web/WEB-INF/web.xml@ 29545

Last change on this file since 29545 was 28296, checked in by jlwhisler, 11 years ago

Removed a deprecated comment. The context path is no longer defined in server.xml. Instead, resources/tomcat/(context).xml is the file that specifies the context path. Specifically, it is the NAME of this file that determines the context path, not any path attributes tothe Context element in the file (such an attribute is actually not allowed for individual context.xml files, according to http://tomcat.apache.org/tomcat-5.5-doc/config/context.html). By default the context.xml file for GS3 is greenstone3.xml, so the default context path is greenstone3. We'll be making some commits shortly that will allow this to be changed via build.properties.

  • Property svn:keywords set to Author Date Id Revision
File size: 12.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2<!-- this is based on a sample web.xml file provided by
3http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/web.xml.txt
4-->
5<web-app>
6 <display-name>GSDL3</display-name>
7 <description>
8 Greenstone digital library version 3.
9 </description>
10
11 <filter>
12 <filter-name>Greenstone URL Filter</filter-name>
13 <filter-class>org.greenstone.gsdl3.core.URLFilter</filter-class>
14 </filter>
15
16 <filter-mapping>
17 <filter-name>Greenstone URL Filter</filter-name>
18 <url-pattern>*</url-pattern>
19 </filter-mapping>
20
21 <!-- Context initialization parameters that define shared
22 String constants used within your application, which
23 can be customized by the system administrator who is
24 installing your application. The values actually
25 assigned to these parameters can be retrieved in a
26 servlet or JSP page by calling:
27
28 String value =
29 getServletContext().getInitParameter("name");
30
31 where "name" matches the <param-name> element of
32 one of these initialization parameters.
33
34 You can define any number of context initialization
35 parameters, including zero.
36 -->
37
38 <context-param>
39 <param-name>webmaster</param-name>
40 <param-value>[email protected]</param-value>
41 <description>
42 The EMAIL address of the administrator to whom questions
43 and comments about this application should be addressed.
44 </description>
45 </context-param>
46
47
48 <!-- Servlet definitions for the servlets that make up
49 your web application, including initialization
50 parameters. With Tomcat, you can also send requests
51 to servlets not listed here with a request like this:
52
53 http://localhost:8080/{context-path}/servlet/{classname}
54
55 but this usage is not guaranteed to be portable. It also
56 makes relative references to images and other resources
57 required by your servlet more complicated, so defining
58 all of your servlets (and defining a mapping to them with
59 a servlet-mapping element) is recommended.
60
61 Servlet initialization parameters can be retrieved in a
62 servlet or JSP page by calling:
63
64 String value =
65 getServletConfig().getInitParameter("name");
66
67 where "name" matches the <param-name> element of
68 one of these initialization parameters.
69
70 You can define any number of servlets, including zero.
71 -->
72
73 <servlet>
74 <servlet-name>tester</servlet-name>
75 <description>a test servlet</description>
76 <servlet-class>TestServlet</servlet-class>
77 </servlet>
78
79 <!-- For client side text fetching -->
80 <servlet>
81 <servlet-name>grabtext</servlet-name>
82 <description>Grabs text for client-side display with minimal overhead.</description>
83 <servlet-class>org.greenstone.gsdl3.ClientSideServlet</servlet-class>
84 </servlet>
85
86
87 <servlet>
88 <servlet-name>library</servlet-name>
89 <description>The standard gsdl3 library program</description>
90 <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
91 <init-param>
92 <param-name>library_name</param-name>
93 <param-value>library</param-value>
94 </init-param>
95 <init-param>
96 <param-name>site_name</param-name>
97 <param-value>localsite</param-value>
98 </init-param>
99 <init-param>
100 <param-name>interface_name</param-name>
101 <param-value>default</param-value>
102 </init-param>
103 <init-param>
104 <param-name>receptionist_class</param-name>
105 <param-value>DefaultReceptionist</param-value>
106 </init-param>
107 <init-param>
108 <param-name>default_lang</param-name>
109 <param-value>en</param-value>
110 </init-param>
111 </servlet>
112
113 <servlet>
114 <servlet-name>gs2-library</servlet-name>
115 <description>Greenstone 2 lookalike library program: uses localsite with the gs2 interface</description>
116 <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
117 <init-param>
118 <param-name>library_name</param-name>
119 <param-value>gs2-library</param-value>
120 </init-param>
121 <init-param>
122 <param-name>site_name</param-name>
123 <param-value>localsite</param-value>
124 </init-param>
125 <init-param>
126 <param-name>interface_name</param-name>
127 <param-value>gs2</param-value>
128 </init-param>
129 <init-param>
130 <param-name>default_lang</param-name>
131 <param-value>en</param-value>
132 </init-param>
133 <init-param>
134 <param-name>session_expiration</param-name>
135 <param-value>1800</param-value>
136 </init-param>
137 <init-param>
138 <param-name>params_class</param-name>
139 <param-value>GS2Params</param-value>
140 </init-param>
141 </servlet>
142
143 <servlet>
144 <servlet-name>nzdl-library</servlet-name>
145 <description>gsdl3 library program</description>
146 <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
147 <init-param>
148 <param-name>library_name</param-name>
149 <param-value>nzdl</param-value>
150 </init-param>
151 <init-param>
152 <param-name>site_name</param-name>
153 <param-value>nzdl</param-value>
154 </init-param>
155 <init-param>
156 <param-name>interface_name</param-name>
157 <param-value>nzdl</param-value>
158 </init-param>
159 <init-param>
160 <param-name>default_lang</param-name>
161 <param-value>en</param-value>
162 </init-param>
163 <init-param>
164 <param-name>params_class</param-name>
165 <param-value>NZDLParams</param-value>
166 </init-param>
167 <init-param>
168 <param-name>session_expiration</param-name>
169 <param-value>600</param-value>
170 </init-param>
171 </servlet>
172
173 <servlet>
174 <servlet-name>gateway</servlet-name>
175 <description>gsdl3 library based on gateway site and basic interface. It uses SOAP to talk to localsite</description>
176 <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
177 <init-param>
178 <param-name>library_name</param-name>
179 <param-value>gateway</param-value>
180 </init-param>
181 <init-param>
182 <param-name>site_name</param-name>
183 <param-value>gateway</param-value>
184 </init-param>
185 <init-param>
186 <param-name>interface_name</param-name>
187 <param-value>basic</param-value>
188 </init-param>
189 <init-param>
190 <param-name>default_lang</param-name>
191 <param-value>en</param-value>
192 </init-param>
193 </servlet>
194
195 <servlet>
196 <servlet-name>basic-library</servlet-name>
197 <description>basic gsdl3 library program: uses localsite and the basic interface</description>
198 <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
199 <init-param>
200 <param-name>library_name</param-name>
201 <param-value>basic-library</param-value>
202 </init-param>
203 <init-param>
204 <param-name>site_name</param-name>
205 <param-value>localsite</param-value>
206 </init-param>
207 <init-param>
208 <param-name>interface_name</param-name>
209 <param-value>basic</param-value>
210 </init-param>
211 <init-param>
212 <param-name>default_lang</param-name>
213 <param-value>en</param-value>
214 </init-param>
215 <!--<init-param>
216 <param-name>allow_client_side_xslt</param-name>
217 <param-value>true</param-value>
218 </init-param>-->
219 </servlet>
220
221 <!-- axis servlets -->
222 <servlet>
223 <servlet-name>AxisServlet</servlet-name>
224 <display-name>Apache-Axis Servlet</display-name>
225 <servlet-class>
226 org.apache.axis.transport.http.AxisServlet
227 </servlet-class>
228 </servlet>
229
230 <servlet>
231 <servlet-name>AdminServlet</servlet-name>
232 <display-name>Axis Admin Servlet</display-name>
233 <servlet-class>
234 org.apache.axis.transport.http.AdminServlet
235 </servlet-class>
236 <load-on-startup>100</load-on-startup>
237 </servlet>
238
239 <servlet>
240 <servlet-name>SOAPMonitorService</servlet-name>
241 <display-name>SOAPMonitorService</display-name>
242 <servlet-class>
243 org.apache.axis.monitor.SOAPMonitorService
244 </servlet-class>
245 <init-param>
246 <param-name>SOAPMonitorPort</param-name>
247 <param-value>5001</param-value>
248 </init-param>
249 <load-on-startup>100</load-on-startup>
250 </servlet>
251
252 <servlet>
253 <servlet-name>oaiserver</servlet-name>
254 <description>an oai servlet</description>
255 <servlet-class>org.greenstone.gsdl3.OAIServer</servlet-class>
256 <init-param>
257 <param-name>default_lang</param-name>
258 <param-value>en</param-value>
259 </init-param>
260 <init-param>
261 <param-name>site_name</param-name>
262 <!-- More than one site name can be specified using the comma separation style: localsite1,localsite2 -->
263 <param-value>localsite</param-value>
264 </init-param>
265 </servlet>
266
267 <servlet>
268 <servlet-name>mat</servlet-name>
269 <description>Metadata Analysis Tool</description>
270 <servlet-class>org.greenstone.mat.servlet.MatServlet</servlet-class>
271 </servlet>
272
273
274
275
276
277 <!-- Define mappings that are used by the servlet container to
278 translate a particular request URI (context-relative) to a
279 particular servlet. The examples below correspond to the
280 servlet descriptions above. Thus, a request URI like:
281
282 http://localhost:8080/{contextpath}/graph
283
284 will be mapped to the "graph" servlet, while a request like:
285
286 http://localhost:8080/{contextpath}/saveCustomer.do
287
288 will be mapped to the "controller" servlet.
289
290 You may define any number of servlet mappings, including zero.
291 It is also legal to define more than one mapping for the same
292 servlet, if you wish to.
293 -->
294 <!--
295
296 <servlet-mapping>
297 <servlet-name>controller</servlet-name>
298 <url-pattern>*.do</url-pattern>
299 </servlet-mapping>
300
301 <servlet-mapping>
302 <servlet-name>graph</servlet-name>
303 <url-pattern>/graph</url-pattern>
304 </servlet-mapping>
305 -->
306
307
308<!--There is no need for this mapping, I think -->
309 <servlet-mapping>
310 <servlet-name>oaiserver</servlet-name>
311 <url-pattern>/oaiserver</url-pattern>
312 </servlet-mapping>
313
314 <servlet-mapping>
315 <servlet-name>nzdl-library</servlet-name>
316 <url-pattern>/nzdl</url-pattern>
317 </servlet-mapping>
318 <servlet-mapping>
319 <servlet-name>tester</servlet-name>
320 <url-pattern>/testing</url-pattern>
321 </servlet-mapping>
322
323 <servlet-mapping>
324 <servlet-name>library</servlet-name>
325 <url-pattern>/library/*</url-pattern>
326 </servlet-mapping>
327
328 <servlet-mapping>
329 <servlet-name>gs2-library</servlet-name>
330 <url-pattern>/gs2-library</url-pattern>
331 </servlet-mapping>
332
333 <servlet-mapping>
334 <servlet-name>gateway</servlet-name>
335 <url-pattern>/gateway</url-pattern>
336 </servlet-mapping>
337
338 <servlet-mapping>
339 <servlet-name>basic-library</servlet-name>
340 <url-pattern>/basic-library</url-pattern>
341 </servlet-mapping>
342
343 <servlet-mapping>
344 <servlet-name>grabtext</servlet-name>
345 <url-pattern>/grabtext</url-pattern>
346 </servlet-mapping>
347
348 <!-- axis mappings -->
349 <servlet-mapping>
350 <servlet-name>AxisServlet</servlet-name>
351 <url-pattern>/servlet/AxisServlet</url-pattern>
352 </servlet-mapping>
353
354 <servlet-mapping>
355 <servlet-name>AxisServlet</servlet-name>
356 <url-pattern>*.jws</url-pattern>
357 </servlet-mapping>
358
359 <servlet-mapping>
360 <servlet-name>AxisServlet</servlet-name>
361 <url-pattern>/services/*</url-pattern>
362 </servlet-mapping>
363
364 <servlet-mapping>
365 <servlet-name>mat</servlet-name>
366 <url-pattern>/mat</url-pattern>
367 </servlet-mapping>
368
369
370 <!-- uncomment this if you want to use the SOAPMonitorService. You will also
371 need to copy the SOAPMonitorApplet*.class files from
372 gsdl3/comms/soap/axis/web/WEB-INF/classes to the gsdl3/web directory. See the
373 comms/soap/axis/docs/install.html Appendix for details about how to use this -->
374 <!--
375 <servlet-mapping>
376 <servlet-name>SOAPMonitorService</servlet-name>
377 <url-pattern>/SOAPMonitor</url-pattern>
378 </servlet-mapping>
379 -->
380 <!-- uncomment this if you want the admin servlet -->
381 <!--
382 <servlet-mapping>
383 <servlet-name>AdminServlet</servlet-name>
384 <url-pattern>/servlet/AdminServlet</url-pattern>
385 </servlet-mapping>
386 -->
387
388 <!-- Define the default session timeout for your application,
389 in minutes. From a servlet or JSP page, you can modify
390 the timeout for a particular session dynamically by using
391 HttpSession.getMaxInactiveInterval(). -->
392
393 <session-config>
394 <session-timeout>240</session-timeout> <!-- 4 hours -->
395 </session-config>
396
397 <!-- axis mime-mappings -->
398 <mime-mapping>
399 <extension>wsdl</extension>
400 <mime-type>text/xml</mime-type>
401 </mime-mapping>
402
403 <mime-mapping>
404 <extension>xsd</extension>
405 <mime-type>text/xml</mime-type>
406 </mime-mapping>
407
408<!-- Deny access to contents of URL pattern /logs/*, although greenstone.log is the important one. It appears the url pattern has to be relative to the web directory.
409http://stackoverflow.com/questions/5333266/tomcat-deny-access-to-specific-files
410and http://www.coderanch.com/t/84442/Tomcat/write-correct-url-pattern-security -->
411 <security-constraint>
412 <web-resource-collection>
413 <web-resource-name>log files</web-resource-name>
414 <description>No direct access to greenstone's logs.</description>
415 <url-pattern>/logs/*</url-pattern>
416 <http-method>POST</http-method>
417 <http-method>GET</http-method>
418 </web-resource-collection>
419 <auth-constraint>
420 <description>No direct browser access to log files.</description>
421 <role-name>NobodyHasThisRole</role-name>
422 </auth-constraint>
423 </security-constraint>
424
425</web-app>
Note: See TracBrowser for help on using the repository browser.