source: exist/trunk/SetUp/web.xml @ 2571

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/SetUp/web.xml@3578
Revision 2571, 20.8 KB checked in by ko23, 12 years ago (diff)
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--+
4    | Configuration file for the web application.
5    |
6    | Provides XMLRPC + SOAP access to eXist and configures Cocoon2. If you don't need
7    | XMLRPC or SOAP or Cocoon, remove the corresponding servlets and servlet-mappings.
8    +-->
9
10<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
11     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
13   
14        <display-name>eXist XML Database</display-name>
15        <description>eXist Open Source Native XML Database</description>
16
17    <!--
18        Initialize Log4j using a servlet.
19        Only needed when eXist is deployed as a .war file in e.g. Tomcat.
20    -->
21    <servlet>
22        <servlet-name>log4j-init</servlet-name>
23        <servlet-class>org.exist.http.servlets.Log4jInit</servlet-class>
24
25        <init-param>
26            <param-name>log4j-init-file</param-name>
27            <param-value>WEB-INF/log4j.xml</param-value>
28        </init-param>
29
30        <load-on-startup>1</load-on-startup>
31    </servlet>
32   
33       
34    <!--
35        RpcServlet provides XML-RPC access to eXist
36    -->
37    <servlet>
38        <servlet-name>org.exist.xmlrpc.RpcServlet</servlet-name>
39        <servlet-class>org.exist.xmlrpc.RpcServlet</servlet-class>
40    </servlet>
41 
42    <!--
43        DatabaseAdminServlet: this servlet can be used to ensure that
44        eXist is running in the background. Just set the start-parameter
45        to true and load-on-startup to 1
46    -->
47    <servlet>
48        <servlet-name>EXistServlet</servlet-name>
49        <servlet-class>org.exist.http.servlets.EXistServlet</servlet-class>
50   
51        <!--
52            where to find eXist's configuration file relative to the basedir
53            of the web-application.
54        -->
55        <init-param>
56            <param-name>configuration</param-name>
57            <param-value>conf.xml</param-value>
58        </init-param>
59
60        <!--
61            eXist's home directory. All file names in the configuration file
62            will be relative to this directory.
63        -->
64        <init-param>
65            <param-name>basedir</param-name>
66            <param-value>WEB-INF/</param-value>
67        </init-param>
68
69        <init-param>
70            <param-name>start</param-name>
71            <param-value>true</param-value>
72        </init-param>
73
74        <load-on-startup>2</load-on-startup>
75    </servlet>
76
77    <!--
78        Servlet that enables webDAV
79    -->
80    <servlet>
81        <servlet-name>WebDAVServlet</servlet-name>
82        <servlet-class>org.exist.http.servlets.WebDAVServlet</servlet-class>
83
84        <init-param>
85            <param-name>authentication</param-name>
86            <param-value>basic</param-value>
87        </init-param>
88    </servlet>
89
90    <!--
91        XQueryServlet generates HTML from an XQuery file.
92    -->
93    <servlet>
94        <servlet-name>XQueryServlet</servlet-name>
95        <servlet-class>org.exist.http.servlets.XQueryServlet</servlet-class>
96
97        <init-param>
98            <param-name>uri</param-name>
99            <param-value>xmldb:exist:///db</param-value>
100        </init-param>
101
102<!--+
103    Modified to give guest access via changed password - KDO
104    +-->
105        <init-param>
106            <param-name>user</param-name>
107            <param-value>guest</param-value>
108        </init-param>
109
110        <init-param>
111            <param-name>password</param-name>
112            <param-value>testpass</param-value>
113        </init-param>
114<!--+
115    End mod to give guest access via changed password - KDO
116    +-->
117
118
119        <init-param>
120            <param-name>form-encoding</param-name>
121            <param-value>UTF-8</param-value>
122        </init-param>
123
124        <init-param>
125            <param-name>container-encoding</param-name>
126            <param-value>UTF-8</param-value>
127        </init-param>
128
129        <init-param>
130            <param-name>encoding</param-name>
131            <param-value>UTF-8</param-value>
132        </init-param>
133    </servlet>
134       
135    <!--
136        Configure the Axis servlets.
137        Axis provides eXist's web-services via SOAP.
138    -->
139    <servlet>
140        <servlet-name>AxisServlet</servlet-name>
141        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
142    </servlet>
143
144    <servlet>
145        <servlet-name>AdminServlet</servlet-name>
146        <servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
147        <load-on-startup>100</load-on-startup>
148    </servlet>
149   
150    <!--
151        ================ Cocoon2 Configuration starts here ================
152    -->
153
154    <servlet>
155        <servlet-name>Cocoon</servlet-name>
156
157        <!--
158            The regular servlet class (trusts the servlet container classloader)
159        -->
160        <servlet-class>org.apache.cocoon.servlet.CocoonServlet</servlet-class>
161
162        <!--
163            In cases you're facing class loading problems, you can alternatively
164            use the following servlet-class instead of the above one
165     
166            <servlet-class>org.apache.cocoon.servlet.ParanoidCocoonServlet</servlet-class>
167        -->
168
169        <!--
170            This parameter tells cocoon to set the thread's context classloader
171            to its own classloader. If you experience strange classloader issues,
172            try setting this parameter to "true" or using ParanoidCocoonServlet.
173        -->
174        <init-param>
175            <param-name>init-classloader</param-name>
176            <param-value>false</param-value>
177        </init-param>
178   
179        <!--
180            This parameter points to the main configuration file for Cocoon.
181            Note that the path is specified in absolute notation but it will be
182            resolved relative to the servlets webapp context path
183        -->
184        <init-param>
185            <param-name>configurations</param-name>
186            <param-value>/WEB-INF/cocoon.xconf</param-value>
187        </init-param>
188
189        <!--
190            This parameter indicates the configuration file of the LogKit
191            management
192        -->
193        <init-param>
194            <param-name>logkit-config</param-name>
195            <param-value>/WEB-INF/logkit.xconf</param-value>
196        </init-param>
197
198        <!--
199            This parameter indicates the category id of the logger from the
200            LogKit configuration used by the CocoonServlet.
201        -->
202        <init-param>
203            <param-name>servlet-logger</param-name>
204            <param-value>access</param-value>
205        </init-param>
206
207        <!--
208            This parameter indicates the category id of the logger from the
209            LogKit management configuration for the Cocoon engine.
210           
211            This logger is used for all components described in the cocoon.xconf
212            and sitemap.xmap file not having specified a logger with the
213            logger="..." attribute in the component configuration file.
214        -->
215        <init-param>
216            <param-name>cocoon-logger</param-name>
217            <param-value>core</param-value>
218        </init-param>
219
220        <!--
221            This parameter indicates the log level to use throughout startup of
222            the system. As soon as the logkit.xconf the setting of the
223            logkit.xconf configuration is used instead!
224            Only for startup and if the logkit.xconf is not readable/available
225            this log level is of importance.
226
227            Available levels are:
228            DEBUG:        prints all level of log messages.
229            INFO:         prints all level of log messages except DEBUG ones.
230            WARN:         prints all level of log messages except DEBUG and INFO ones.
231            ERROR:        prints all level of log messages except DEBUG, INFO and WARN ones.
232            FATAL_ERROR:  prints only log messages of this level
233        -->
234        <init-param>
235            <param-name>log-level</param-name>
236            <param-value>WARN</param-value>
237        </init-param>
238
239        <!--
240            Allow reinstantiating (reloading) of the cocoon instance. If this is
241            set to "yes" or "true", a new cocoon instance can be created using
242            the request parameter "cocoon-reload".
243        -->
244        <init-param>
245            <param-name>allow-reload</param-name>
246            <param-value>no</param-value>
247        </init-param>
248
249        <!--
250            This parameter is used to list classes that should be loaded
251            at initialization time of the servlet.
252            Usually this classes are JDBC Drivers used
253        -->
254        <init-param>
255            <param-name>load-class</param-name>
256            <param-value>
257            <!-- For IBM WebSphere:
258            com.ibm.servlet.classloader.Handler -->
259
260            <!-- For Database Driver: -->
261            <!-- org.hsqldb.jdbcDriver -->
262
263            <!-- For PostgeSQL Database:
264            org.postgresql.Driver -->
265
266            <!-- For Oracle Database:
267            oracle.jdbc.driver.OracleDriver -->
268
269            <!-- ODBC
270            sun.jdbc.odbc.JdbcOdbcDriver -->
271 
272            <!-- For parent ComponentManager sample:
273            org.apache.cocoon.samples.parentcm.Configurator
274            --></param-value>
275        </init-param>
276
277        <!--
278            Causes all files in multipart requests to be processed. Default is
279            false for security reasons. Unsupported values will be interpreted
280            as false.
281        -->
282        <init-param>
283            <param-name>enable-uploads</param-name>
284            <param-value>true</param-value>
285        </init-param>
286   
287        <!--
288            This parameter allows to specify where Cocoon should put uploaded
289            files. The path specified can be either absolute or relative to the
290            context path of the servlet. On windows platform, absolute directory
291            must start with volume: C:\Path\To\Upload\Directory
292
293            The default directory is "upload-dir" in the work-directory
294        -->
295        <!--init-param>
296            <param-name>upload-directory</param-name>
297            <param-value>WEB-INF/work/upload-dir</param-value>
298        </init-param-->
299
300        <!--
301            Causes all files in multipart requests to be saved to upload-dir.
302            Default is true for security reasons. Unsupported values will be
303            interpreted as false.
304        -->
305        <init-param>
306            <param-name>autosave-uploads</param-name>
307            <param-value>true</param-value>
308        </init-param>
309
310        <!--
311            Specify handling of name conflicts when saving uploaded files
312            to disk.  Acceptable values are deny, allow, rename (default).
313            Files are renamed x_filename where x is an integer value
314            incremented to make the new filename unique.
315        -->
316        <init-param>
317            <param-name>overwrite-uploads</param-name>
318            <param-value>allow</param-value>
319        </init-param>
320   
321        <!--
322            Specify maximum allowed size of the upload. Defaults to 10 Mb.
323        -->
324        <init-param>
325            <param-name>upload-max-size</param-name>
326            <param-value>100000000</param-value>
327        </init-param>
328
329        <!--
330            This parameter allows to specify where Cocoon should create its page
331            and other objects cache. The path specified can be either absolute
332            or relative to the context path of the servlet. On windows platform,
333            absolute directory must start with volume: C:\Path\To\Cache\Directory
334     
335            The default directory is "cache-dir" in the work-directory
336        -->
337        <!--init-param>
338            <param-name>cache-directory</param-name>
339            <param-value>WEB-INF/work/cache-dir</param-value>
340        </init-param-->
341
342        <!--
343            This parameter allows to specify where Cocoon should put it's
344            working files. The path specified is either absolute or relative
345            to the context path of the Cocoon servlet.  On windows platform,
346            absolute directory must start with volume: C:\Path\To\Work\Directory
347
348            The default directory is "cocoon-files" directory in the servlet
349            context's temp directory (context property javax.servlet.context.tempdir).
350        -->
351        <!--init-param>
352            <param-name>work-directory</param-name>
353            <param-value>WEB-INF/work</param-value>
354        </init-param-->
355
356        <!--
357            This parameter allows to specify additional directories or jars
358            which Cocoon should put into it's own classpath.
359            Note that you must separate them using the platforms path.separator
360            (":" for *nix and ";" for Windows systems). Also note that absolute
361            pathes are take as such but relative pathes are rooted at the context
362            root of the Cocoon servlet.
363        -->
364        <!--init-param>
365            <param-name>extra-classpath</param-name>
366            <param-value>WEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.jar</param-value>
367        </init-param-->
368       
369
370        <!--
371            This parameter allows you to select the parent component manager.
372            The class will be instantiated via the constructor that takes a
373            single String as a parameter. That String will be equal to the text
374            after the '/'.
375
376            Cocoon honors the LogEnabled and Initializable interfaces for this
377            class, if it implements them.
378
379            If you uncomment the following lines the parent CM is set to the
380            Parent CM sample, which will look up a configuration via JNDI at
381            org/apache/cocoon/samples/parentcm/ParentCMConfiguration and use it.
382        -->
383        <!--init-param>
384            <param-name>parent-component-manager</param-name>
385            <param-value>org.apache.cocoon.samples.parentcm.ParentComponentManager/org/apache/cocoon/samples/parentcm/ParentCMConfiguration</param-value>
386        </init-param-->
387       
388
389        <!--
390            If you set this parameter to 'true' or 'yes', Cocoon will add
391            processing time to the end of each response. Value 'hide' adds
392            processing time as an HTML comment. By default, processing time is
393            not added (corresponds to value 'no').
394        -->
395        <!--init-param>
396            <param-name>show-time</param-name>
397            <param-value>hide</param-value>
398        </init-param-->
399       
400
401        <!--
402            If true or not set, this class will try to catch and handle all
403            Cocoon exceptions. If false, it will rethrow them to the servlet
404            container.
405        -->
406        <init-param>
407            <param-name>manage-exceptions</param-name>
408            <param-value>true</param-value>
409        </init-param>
410   
411        <!--
412            If true, Avalon Excalibur instrumentation will be enabled on all
413            Instrumentable components with Cocoon and your Cocoon application.
414        -->
415        <!--init-param>
416            <param-name>enable-instrumentation</param-name>
417            <param-value>true</param-value>
418        </init-param-->
419
420        <!--
421            This defines the location of the instrument manager configuration,
422            only used if the init-param enable-instrumentation is enabled.
423        -->
424        <!--init-param>
425            <param-name>instrumentation-config</param-name>
426            <param-value>/WEB-INF/instrumentation.xconf</param-value>
427        </init-param-->
428
429        <!--
430            Set encoding used by the container. If not set the ISO-8859-1
431            encoding will be assumed.
432        -->
433        <init-param>
434            <param-name>container-encoding</param-name>
435            <param-value>UTF-8</param-value>
436        </init-param>
437
438        <!--
439            Set form encoding. This will be the character set used to decode
440            request parameters. If not set the ISO-8859-1 encoding will be
441            assumed.
442        -->
443        <init-param>
444            <param-name>form-encoding</param-name>
445            <param-value>UTF-8</param-value>
446        </init-param>
447
448        <!--
449            This parameter allows you to startup Cocoon2 immediately after
450            startup of your servlet engine.
451        -->
452        <load-on-startup>1</load-on-startup>
453    </servlet>
454
455    <!--
456        Needed to overwrite the Cocoon default
457    -->
458    <servlet>
459        <servlet-name>Jasper</servlet-name>
460        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
461    </servlet>
462   
463    <!--
464        Register Webstart servlet
465    -->
466    <servlet>
467        <servlet-name>jnlp</servlet-name>
468        <servlet-class>org.exist.webstart.JnlpServlet</servlet-class>
469    </servlet>
470   
471   
472    <!-- ====================== URL space mappings ======================= -->
473
474    <!-- XMLRPC -->
475    <servlet-mapping>
476        <servlet-name>org.exist.xmlrpc.RpcServlet</servlet-name>
477        <url-pattern>/xmlrpc</url-pattern>
478    </servlet-mapping>
479     
480    <!-- REST new mapping-->
481    <servlet-mapping>
482        <servlet-name>EXistServlet</servlet-name>
483        <url-pattern>/rest/*</url-pattern>
484    </servlet-mapping>
485   
486    <!-- REST original mapping-->
487    <servlet-mapping>
488        <servlet-name>EXistServlet</servlet-name>
489        <url-pattern>/servlet/*</url-pattern>
490    </servlet-mapping>
491
492    <!-- webDAV -->
493    <servlet-mapping>
494        <servlet-name>WebDAVServlet</servlet-name>
495        <url-pattern>/webdav/*</url-pattern>
496    </servlet-mapping>
497
498    <!-- XQuery (not for database stored queries) -->
499    <servlet-mapping>
500        <servlet-name>XQueryServlet</servlet-name>
501        <url-pattern>*.xql</url-pattern>
502    </servlet-mapping>
503
504    <servlet-mapping>
505        <servlet-name>XQueryServlet</servlet-name>
506        <url-pattern>*.xqy</url-pattern>
507    </servlet-mapping>
508     
509    <!-- SOAP (Apache Axis) -->
510    <servlet-mapping>
511        <servlet-name>AxisServlet</servlet-name>
512        <url-pattern>/axis-servlet/AxisServlet</url-pattern>
513    </servlet-mapping>
514
515    <servlet-mapping>
516        <servlet-name>AxisServlet</servlet-name>
517        <url-pattern>*.jws</url-pattern>
518    </servlet-mapping>
519
520    <servlet-mapping>
521        <servlet-name>AxisServlet</servlet-name>
522        <url-pattern>/services/*</url-pattern>
523    </servlet-mapping>
524
525    <servlet-mapping>
526        <servlet-name>AdminServlet</servlet-name>
527        <url-pattern>/axis-servlet/AdminServlet</url-pattern>
528    </servlet-mapping>
529   
530    <!--
531        Finally, we establish the main mapping for Cocoon 
532    -->
533 
534    <!--
535        Cocoon handles all the URL space assigned to the webapp using its
536        sitemap. It is recommended to leave it unchanged. Under some
537        circumstances though (like integration with proprietary webapps or
538        servlets) you might have to change this parameter.
539    -->
540    <servlet-mapping>
541        <servlet-name>Cocoon</servlet-name>
542        <url-pattern>/</url-pattern>
543    </servlet-mapping>
544
545    <servlet-mapping>
546        <servlet-name>Jasper</servlet-name>
547        <url-pattern>*.jsp</url-pattern>
548    </servlet-mapping>
549
550    <!--
551        Some servlet engines (WebLogic) have defaults which are not overriden
552        by '/' mapping, but must be overriden explicitly.
553    -->
554    <servlet-mapping>
555        <servlet-name>Cocoon</servlet-name>
556        <url-pattern>*.html</url-pattern>
557    </servlet-mapping>
558
559    <!-- Java Webstart -->
560    <servlet-mapping>
561        <servlet-name>jnlp</servlet-name>
562        <url-pattern>/webstart/*</url-pattern>
563    </servlet-mapping>
564   
565   
566    <!-- ==================== various MIME type mappings ================== -->
567
568    <mime-mapping>
569        <extension>css</extension>
570        <mime-type>text/css</mime-type>
571    </mime-mapping>
572
573    <mime-mapping>
574        <extension>xml</extension>
575        <mime-type>text/xml</mime-type>
576    </mime-mapping>
577
578    <mime-mapping>
579        <extension>xsl</extension>
580        <mime-type>text/xml</mime-type>
581    </mime-mapping>
582
583    <mime-mapping>
584        <extension>xconf</extension>
585        <mime-type>text/xml</mime-type>
586    </mime-mapping>
587
588    <mime-mapping>
589        <extension>xmap</extension>
590        <mime-type>text/xml</mime-type>
591    </mime-mapping>
592
593    <mime-mapping>
594        <extension>ent</extension>
595        <mime-type>text/plain</mime-type>
596    </mime-mapping>
597
598    <mime-mapping>
599        <extension>grm</extension>
600        <mime-type>text/plain</mime-type>
601    </mime-mapping>
602
603    <jsp-config>
604        <taglib>
605            <taglib-uri>http://exist-db.org/exist</taglib-uri>
606            <taglib-location>/WEB-INF/exist.tld</taglib-location>
607        </taglib>
608    </jsp-config>
609   
610</web-app>
Note: See TracBrowser for help on using the repository browser.