-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.xml
541 lines (493 loc) · 17.7 KB
/
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<?xml version="1.0" encoding="UTF-8"?>
<!--+
| Configuration file for the web application.
|
| The URL mapping for rest, xmlrpc, soap etc are handled now by the
| XQueryURLRewrite servlet filter. See for details below.
|
| $Id: web.xml 14172 2011-04-12 09:49:26Z deliriumsky $
+-->
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<description>eXist Open Source Native XML Database</description>
<display-name>eXist XML Database</display-name>
<!--====================== betterFORM configuration file ====================== -->
<context-param>
<param-name>betterform.configfile</param-name>
<param-value>WEB-INF/betterform-config.xml</param-value>
</context-param>
<!--
| ScaleImageJAI servlet: scale images on the fly and cache
| the output. Commented out by default.
+-->
<!--
<servlet>
<servlet-name>ScaleImageJAI</servlet-name>
<servlet-class>org.exist.http.servlets.ScaleImageJAI</servlet-class>
<init-param>
<param-name>base</param-name>
<param-value>xmldb:exist:///db</param-value>
</init-param>
<init-param>
<param-name>output-dir</param-name>
<param-value>/home/wolf/images</param-value>
</init-param>
</servlet>
-->
<!--
Log4jInit initializes Log4j.
Only needed when eXist is deployed as a .war file in e.g. Tomcat.
-->
<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>org.exist.http.servlets.Log4jInit</servlet-class>
<init-param>
<param-name>log4j-init-file</param-name>
<param-value>WEB-INF/log4j.xml</param-value>
</init-param>
<init-param>
<param-name>log4j-log-dir</param-name>
<param-value>WEB-INF/logs</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!--
RpcServlet provides XML-RPC access.
-->
<servlet>
<servlet-name>org.exist.xmlrpc.RpcServlet</servlet-name>
<servlet-class>org.exist.xmlrpc.RpcServlet</servlet-class>
<init-param>
<param-name>enabledForExtensions</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>useDefaultUser</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<!--
EXistServlet is a helper servlet that is used to ensure that
eXist is running in the background.
Set the start-parameter to true and load-on-startup a low value e.g. 2.
-->
<servlet>
<servlet-name>EXistServlet</servlet-name>
<servlet-class>org.exist.http.servlets.EXistServlet</servlet-class>
<!--
Location of eXist's configuration file relative to the basedir
of the web-application.
-->
<init-param>
<param-name>configuration</param-name>
<param-value>conf.xml</param-value>
</init-param>
<!--
eXist's home directory. All file names in the configuration file
will be relative to this directory.
-->
<init-param>
<param-name>basedir</param-name>
<param-value>WEB-INF/</param-value>
</init-param>
<init-param>
<param-name>start</param-name>
<param-value>true</param-value>
</init-param>
<!--
If parameter "hidden" is set to true, direct access to the
REST interface will be denied. Only requests coming from the
URL rewriting will be processed.
Rationale: on a production server, you may want to store the
application within the database, but without allowing users
to browse the database contents. By setting hidden=true, you
can expose defined URLs to the outside world via URL rewriting
while hiding the rest of the database.
-->
<init-param>
<param-name>hidden</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!--
JMXservlet is a servlet to monitor the database. It returns status information
for the database based on the JMX interface.
-->
<servlet>
<servlet-name>JMXServlet</servlet-name>
<servlet-class>org.exist.management.client.JMXServlet</servlet-class>
</servlet>
<!--
Milton provides the WebDAV interface
-->
<servlet>
<servlet-name>milton</servlet-name>
<servlet-class>org.exist.webdav.MiltonWebDAVServlet</servlet-class>
<!-- Don't change this value -->
<init-param>
<param-name>resource.factory.class</param-name>
<param-value>org.exist.webdav.ExistResourceFactory</param-value>
</init-param>
<!--
Some WebDAV clients send a "Expect: 100-continue" header before
uploading body data. Servlet containers (like tomcat and jetty) handle
the header in a wrong way, making a client not work OK.
Set value to TRUE to restore old behavior (FALSE is the new default
value, hardcoded in MiltonWebDAVServlet).
-->
<!--
<init-param>
<param-name>enable.expect.continue</param-name>
<param-value>false</param-value>
</init-param>
-->
<!-- Uncomment to enable debugging -->
<!--
<init-param>
<param-name>filter_0</param-name>
<param-value>com.bradmcevoy.http.DebugFilter</param-value>
</init-param>
-->
</servlet>
<!--
XQueryServlet generates HTML from an XQuery file.
-->
<servlet>
<servlet-name>XQueryServlet</servlet-name>
<servlet-class>org.exist.http.servlets.XQueryServlet</servlet-class>
<init-param>
<param-name>uri</param-name>
<param-value>xmldb:exist:///db</param-value>
</init-param>
<init-param>
<param-name>form-encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>container-encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</servlet>
<!--
XQueryURLRewrite, servlet filter for URL rewriting and redirection.
-->
<servlet>
<servlet-name>XQueryURLRewrite</servlet-name>
<servlet-class>org.exist.http.urlrewrite.XQueryURLRewrite</servlet-class>
<!-- Defines the location of the controller-config.xml file,
which defines the root mappings. -->
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/controller-config.xml</param-value>
</init-param>
<!-- The controller-config.xml file could also be stored inside the db: -->
<!--
<init-param>
<param-name>config</param-name>
<param-value>xmldb:exist:///db/controller-config.xml</param-value>
</init-param>
-->
<!--
<init-param>
<param-name>compiled-cache</param-name>
<param-value>false</param-value>
</init-param>
-->
</servlet>
<!--
XSLTServlet applies an XSLT transformation to its input stream.
-->
<servlet>
<servlet-name>XSLTServlet</servlet-name>
<servlet-class>org.exist.http.servlets.XSLTServlet</servlet-class>
</servlet>
<!--
<servlet>
<servlet-name>OAuthServlet</servlet-name>
<servlet-class>org.exist.security.realm.oauth.OAuthServlet</servlet-class>
</servlet>
-->
<!--
Axis provides SOAP access eXist's web-services.
-->
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>AdminServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
<!--
Atom Publishing Protocol.
-->
<servlet>
<servlet-name>AtomServlet</servlet-name>
<servlet-class>org.exist.atom.http.AtomServlet</servlet-class>
</servlet>
<!--
EXQuery - RESTXQ
-->
<servlet>
<servlet-name>RestXqServlet</servlet-name>
<servlet-class>org.exist.extensions.exquery.restxq.impl.RestXqServlet</servlet-class>
</servlet>
<!--
Webstart servlet, provides access to the java client.
-->
<servlet>
<servlet-name>jnlp</servlet-name>
<servlet-class>org.exist.webstart.JnlpServlet</servlet-class>
</servlet>
<!--====================== betterFORM filter and servlets ======================-->
<!--====================== betterFORM servlets ======================-->
<servlet>
<servlet-name>Flux</servlet-name>
<servlet-class>
org.directwebremoting.servlet.DwrServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>XFormsPostServlet</servlet-name>
<servlet-class>
de.betterform.agent.web.servlet.XFormsPostServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>FormsServlet</servlet-name>
<servlet-class>
de.betterform.agent.web.servlet.FormsServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>inspector</servlet-name>
<servlet-class>
de.betterform.agent.web.servlet.XFormsInspectorServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>ResourceServlet</servlet-name>
<servlet-class>
de.betterform.agent.web.resources.ResourceServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>error</servlet-name>
<servlet-class>de.betterform.agent.web.servlet.ErrorServlet</servlet-class>
</servlet>
<!--====================== betterFORM servlets mapping ======================-->
<servlet-mapping>
<servlet-name>Flux</servlet-name>
<url-pattern>/Flux/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>XFormsPostServlet</servlet-name>
<url-pattern>/XFormsPost</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>XQueryServlet</servlet-name>
<url-pattern>*.xql</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>FormsServlet</servlet-name>
<url-pattern>/forms/formslist</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>inspector</servlet-name>
<url-pattern>/inspector/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ResourceServlet</servlet-name>
<url-pattern>/bfResources/*</url-pattern>
<init-param>
<param-name>caching</param-name>
<param-value>true</param-value>
</init-param>
</servlet-mapping>
<servlet-mapping>
<servlet-name>error</servlet-name>
<url-pattern>/error/*</url-pattern>
</servlet-mapping>
<!--====================== betterFORM filter ======================-->
<filter>
<filter-name>XFormsFilter</filter-name>
<filter-class>
de.betterform.agent.web.filter.XFormsFilter
</filter-class>
</filter>
<!--====================== betterFORM filter mapping ======================-->
<filter-mapping>
<filter-name>XFormsFilter</filter-name>
<url-pattern>/apps/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>XFormsFilter</filter-name>
<servlet-name>XFormsPostServlet</servlet-name>
</filter-mapping>
<listener>
<listener-class>de.betterform.agent.web.servlet.BfServletContextListener</listener-class>
</listener>
<!--====================== betterFORM filter and servlets ======================-->
<!--
====================== URL space mappings =======================
-->
<!--
IMPORTANT: the XQueryURLRewrite servlet filter does now serve as a single
entry point into the web application. All eXist-related URL mappings are
handled by XQueryURLRewrite (see controller-config.xml).
The servlet mappings below are thus commented out. We keep them here
for documentation purposes. If you need to switch to the old setup,
you can re-enable the mappings below and disable them in controller-config.xml.
However, please note that some features of the website will only work if
XQueryURLRewrite controls the /rest servlet (EXistServlet).
-->
<!-- XQuery URL rewriter -->
<servlet-mapping>
<servlet-name>XQueryURLRewrite</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- XMLRPC -->
<!--
<servlet-mapping>
<servlet-name>org.exist.xmlrpc.RpcServlet</servlet-name>
<url-pattern>/xmlrpc</url-pattern>
</servlet-mapping>
-->
<!-- REST -->
<!--
<servlet-mapping>
<servlet-name>EXistServlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
-->
<!-- XQuery (Note: not for database stored queries) -->
<!--
<servlet-mapping>
<servlet-name>XQueryServlet</servlet-name>
<url-pattern>*.xql</url-pattern>
</servlet-mapping>
-->
<!-- SOAP (Apache Axis) -->
<!--
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/axis-servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AdminServlet</servlet-name>
<url-pattern>/axis-servlet/AdminServlet</url-pattern>
</servlet-mapping>
-->
<!--
==================== various MIME type mappings ==================
-->
<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsl</extension>
<mime-type>application/xml+xslt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xconf</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xmap</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ent</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>grm</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cacert</extension>
<mime-type>application/x-x509-ca-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>p12</extension>
<mime-type>application/x-pkcs12</mime-type>
</mime-mapping>
<!--
<jsp-config>
<taglib>
<taglib-uri>http://exist-db.org/exist</taglib-uri>
<taglib-location>/WEB-INF/exist.tld</taglib-location>
</taglib>
</jsp-config>
-->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>JAASLoginService</realm-name>
<form-login-config>
<form-login-page>/login/login</form-login-page>
<form-error-page>/login/error</form-error-page>
</form-login-config>
</login-config>
<!--
Enable dynamic GZip of server responses
Standard approach is to use org.eclipse.jetty.servlets.GZipFilter, the
javadoc describes the init-params and the conditions under which gzip encoding
is applied - http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/servlets/GzipFilter.html
A more flexible approach can be gained by using org.eclipse.jetty.servlets.IncludableGzipFilter,
the javadoc can be found here - http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/servlets/IncludableGzipFilter.html
-->
<!--
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.eclipse.jetty.servlets.IncludableGzipFilter</filter-class>
<!- <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class> -!>
<!- <async-support>true</async-support> -!>
<init-param>
<param-name>bufferSize</param-name>
<param-value>8192</param-value>
</init-param>
<init-param>
<param-name>minGzipSize</param-name>
<param-value>2048</param-value>
</init-param>
<init-param>
<param-name>userAgent</param-name>
<param-value>(?:Mozilla[^\(]*\(compatible;\s*+([^;]*);.*)|(?:.*?([^\s]+/[^\s]+).*)</param-value>
</init-param>
<init-param>
<param-name>cacheSize</param-name>
<param-value>1024</param-value>
</init-param>
<init-param>
<param-name>excludedAgents</param-name>
<param-value>MSIE 6.0</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
-->
</web-app>