1 <?xml version="1.0" encoding="ISO-8859-1"?>
3 <!-- ===================================================================== -->
4 <!-- This file contains the default descriptor for web applications. -->
5 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
6 <!-- The intent of this descriptor is to include jetty specific or common -->
7 <!-- configuration for all webapps. If a context has a webdefault.xml -->
8 <!-- descriptor, it is applied before the contexts own web.xml file -->
10 <!-- A context may be assigned a default descriptor by: -->
11 <!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
12 <!-- + Passed an arg to addWebApplications -->
14 <!-- This file is used both as the resource within the jetty.jar (which is -->
15 <!-- used as the default if no explicit defaults descriptor is set) and it -->
16 <!-- is copied to the etc directory of the Jetty distro and explicitly -->
17 <!-- by the jetty.xml file. -->
19 <!-- ===================================================================== -->
21 xmlns="http://java.sun.com/xml/ns/javaee"
22 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
24 metadata-complete="true"
30 This file is applied to a Web application before it's own WEB_INF/web.xml file
33 <!-- ==================================================================== -->
34 <!-- Removes static references to beans from javax.el.BeanELResolver to -->
35 <!-- ensure webapp classloader can be released on undeploy -->
36 <!-- ==================================================================== -->
38 <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
41 <!-- ==================================================================== -->
42 <!-- Removes static cache of Methods from java.beans.Introspector to -->
43 <!-- ensure webapp classloader can be released on undeploy -->
44 <!-- ==================================================================== -->
46 <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
50 <!-- ==================================================================== -->
51 <!-- Context params to control Session Cookies -->
52 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
54 UNCOMMENT TO ACTIVATE <context-param> <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name> <param-value>127.0.0.1</param-value> </context-param> <context-param>
55 <param-name>org.eclipse.jetty.servlet.SessionPath</param-name> <param-value>/</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.MaxAge</param-name>
56 <param-value>-1</param-value> </context-param>
59 <!-- ==================================================================== -->
60 <!-- The default servlet. -->
61 <!-- This servlet, normally mapped to /, provides the handling for static -->
62 <!-- content, OPTIONS and TRACE methods for the context. -->
63 <!-- The following initParameters are supported: -->
65 * acceptRanges If true, range requests and responses are
68 * dirAllowed If true, directory listings are returned if no
69 * welcome file is found. Else 403 Forbidden.
71 * welcomeServlets If true, attempt to dispatch to welcome files
72 * that are servlets, but only after no matching static
73 * resources could be found. If false, then a welcome
74 * file must exist on disk. If "exact", then exact
75 * servlet matches are supported without an existing file.
78 * This must be false if you want directory listings,
79 * but have index.jsp in your welcome file list.
81 * redirectWelcome If true, welcome files are redirected rather than
84 * gzip If set to true, then static content will be served as
85 * gzip content encoded if a matching resource is
86 * found ending with ".gz"
88 * resourceBase Set to replace the context resource base
90 * resourceCache If set, this is a context attribute name, which the servlet
91 * will use to look for a shared ResourceCache instance.
93 * relativeResourceBase
94 * Set with a pathname relative to the base of the
95 * servlet context root. Useful for only serving static content out
96 * of only specific subdirectories.
98 * aliases If True, aliases of resources are allowed (eg. symbolic
99 * links and caps variations). May bypass security constraints.
101 * maxCacheSize The maximum total size of the cache or 0 for no cache.
102 * maxCachedFileSize The maximum size of a file to cache
103 * maxCachedFiles The maximum number of files to cache
105 * useFileMappedBuffer
106 * If set to true, it will use mapped file buffer to serve static content
107 * when using NIO connector. Setting this value to false means that
108 * a direct buffer will be used instead of a mapped file buffer.
109 * By default, this is set to true.
111 * cacheControl If set, all static content will have this value set as the cache-control
116 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
118 <servlet-name>default</servlet-name>
119 <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
121 <param-name>aliases</param-name>
122 <param-value>false</param-value>
125 <param-name>acceptRanges</param-name>
126 <param-value>true</param-value>
129 <param-name>dirAllowed</param-name>
130 <param-value>true</param-value>
133 <param-name>welcomeServlets</param-name>
134 <param-value>false</param-value>
137 <param-name>redirectWelcome</param-name>
138 <param-value>false</param-value>
141 <param-name>maxCacheSize</param-name>
142 <param-value>256000000</param-value>
145 <param-name>maxCachedFileSize</param-name>
146 <param-value>200000000</param-value>
149 <param-name>maxCachedFiles</param-name>
150 <param-value>2048</param-value>
153 <param-name>gzip</param-name>
154 <param-value>true</param-value>
157 <param-name>useFileMappedBuffer</param-name>
158 <param-value>true</param-value>
162 <param-name>resourceCache</param-name>
163 <param-value>resourceCache</param-value>
168 <param-name>cacheControl</param-name>
169 <param-value>max-age=3600,public</param-value>
172 <load-on-startup>0</load-on-startup>
176 <servlet-name>default</servlet-name>
177 <url-pattern>/</url-pattern>
181 <!-- ==================================================================== -->
183 <!-- This is the jasper JSP servlet from the jakarta project -->
184 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
185 <!-- The JSP page compiler and execution servlet, which is the mechanism -->
186 <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
187 <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
188 <!-- following initialization parameters (default values are in square -->
191 <!-- checkInterval If development is false and reloading is true, -->
192 <!-- background compiles are enabled. checkInterval -->
193 <!-- is the time in seconds between checks to see -->
194 <!-- if a JSP page needs to be recompiled. [300] -->
196 <!-- compiler Which compiler Ant should use to compile JSP -->
197 <!-- pages. See the Ant documenation for more -->
198 <!-- information. [javac] -->
200 <!-- classdebuginfo Should the class file be compiled with -->
201 <!-- debugging information? [true] -->
203 <!-- classpath What class path should I use while compiling -->
204 <!-- generated servlets? [Created dynamically -->
205 <!-- based on the current web application] -->
206 <!-- Set to ? to make the container explicitly set -->
207 <!-- this parameter. -->
209 <!-- development Is Jasper used in development mode (will check -->
210 <!-- for JSP modification on every access)? [true] -->
212 <!-- enablePooling Determines whether tag handler pooling is -->
213 <!-- enabled [true] -->
215 <!-- fork Tell Ant to fork compiles of JSP pages so that -->
216 <!-- a separate JVM is used for JSP page compiles -->
217 <!-- from the one Tomcat is running in. [true] -->
219 <!-- ieClassId The class-id value to be sent to Internet -->
220 <!-- Explorer when using <jsp:plugin> tags. -->
221 <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
223 <!-- javaEncoding Java file encoding to use for generating java -->
224 <!-- source files. [UTF-8] -->
226 <!-- keepgenerated Should we keep the generated Java source code -->
227 <!-- for each page instead of deleting it? [true] -->
229 <!-- logVerbosityLevel The level of detailed messages to be produced -->
230 <!-- by this servlet. Increasing levels cause the -->
231 <!-- generation of more messages. Valid values are -->
232 <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
235 <!-- mappedfile Should we generate static content with one -->
236 <!-- print statement per input line, to ease -->
237 <!-- debugging? [false] -->
240 <!-- reloading Should Jasper check for modified JSPs? [true] -->
242 <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
243 <!-- debugging be suppressed? [false] -->
245 <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
246 <!-- dumped to a file? [false] -->
247 <!-- False if suppressSmap is true -->
249 <!-- scratchdir What scratch directory should we use when -->
250 <!-- compiling JSP pages? [default work directory -->
251 <!-- for the current web application] -->
253 <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
255 <!-- xpoweredBy Determines whether X-Powered-By response -->
256 <!-- header is added by generated servlet [false] -->
258 <!-- If you wish to use Jikes to compile JSP pages: -->
259 <!-- Set the init parameter "compiler" to "jikes". Define -->
260 <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
261 <!-- to cause Jikes to emit error messages in a format compatible with -->
263 <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
264 <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
265 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
269 <servlet-name>jsp</servlet-name>
270 <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
272 <param-name>logVerbosityLevel</param-name>
273 <param-value>DEBUG</param-value>
276 <param-name>fork</param-name>
277 <param-value>false</param-value>
280 <param-name>xpoweredBy</param-name>
281 <param-value>false</param-value>
285 <param-name>classpath</param-name>
286 <param-value>?</param-value>
289 <load-on-startup>0</load-on-startup>
293 <servlet-name>jsp</servlet-name>
294 <url-pattern>*.jsp</url-pattern>
295 <url-pattern>*.jspf</url-pattern>
296 <url-pattern>*.jspx</url-pattern>
297 <url-pattern>*.xsp</url-pattern>
298 <url-pattern>*.JSP</url-pattern>
299 <url-pattern>*.JSPF</url-pattern>
300 <url-pattern>*.JSPX</url-pattern>
301 <url-pattern>*.XSP</url-pattern>
304 <!-- ==================================================================== -->
305 <!-- Dynamic Servlet Invoker. -->
306 <!-- This servlet invokes anonymous servlets that have not been defined -->
307 <!-- in the web.xml or by other means. The first element of the pathInfo -->
308 <!-- of a request passed to the envoker is treated as a servlet name for -->
309 <!-- an existing servlet, or as a class name of a new servlet. -->
310 <!-- This servlet is normally mapped to /servlet/* -->
311 <!-- This servlet support the following initParams: -->
313 <!-- nonContextServlets If false, the invoker can only load -->
314 <!-- servlets from the contexts classloader. -->
315 <!-- This is false by default and setting this -->
316 <!-- to true may have security implications. -->
318 <!-- verbose If true, log dynamic loads -->
320 <!-- * All other parameters are copied to the -->
321 <!-- each dynamic servlet as init parameters -->
322 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
324 Uncomment for dynamic invocation <servlet> <servlet-name>invoker</servlet-name> <servlet-class>org.eclipse.jetty.servlet.Invoker</servlet-class> <init-param> <param-name>verbose</param-name>
325 <param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
326 <param-name>dynamicParam</param-name> <param-value>anyValue</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>invoker</servlet-name>
327 <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
332 <!-- ==================================================================== -->
334 <session-timeout>30</session-timeout>
337 <!-- ==================================================================== -->
338 <!-- Default MIME mappings -->
339 <!-- The default MIME mappings are provided by the mime.properties -->
340 <!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified -->
341 <!-- mappings may be specified here -->
342 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
343 <!-- UNCOMMENT TO ACTIVATE
345 <extension>mysuffix</extension>
346 <mime-type>mymime/type</mime-type>
350 <!-- ==================================================================== -->
352 <welcome-file>index.html</welcome-file>
353 <welcome-file>index.htm</welcome-file>
354 <welcome-file>index.jsp</welcome-file>
357 <!-- ==================================================================== -->
358 <locale-encoding-mapping-list>
359 <locale-encoding-mapping>
361 <encoding>ISO-8859-6</encoding>
362 </locale-encoding-mapping>
363 <locale-encoding-mapping>
365 <encoding>ISO-8859-5</encoding>
366 </locale-encoding-mapping>
367 <locale-encoding-mapping>
369 <encoding>ISO-8859-5</encoding>
370 </locale-encoding-mapping>
371 <locale-encoding-mapping>
373 <encoding>ISO-8859-1</encoding>
374 </locale-encoding-mapping>
375 <locale-encoding-mapping>
377 <encoding>ISO-8859-2</encoding>
378 </locale-encoding-mapping>
379 <locale-encoding-mapping>
381 <encoding>ISO-8859-1</encoding>
382 </locale-encoding-mapping>
383 <locale-encoding-mapping>
385 <encoding>ISO-8859-1</encoding>
386 </locale-encoding-mapping>
387 <locale-encoding-mapping>
389 <encoding>ISO-8859-7</encoding>
390 </locale-encoding-mapping>
391 <locale-encoding-mapping>
393 <encoding>ISO-8859-1</encoding>
394 </locale-encoding-mapping>
395 <locale-encoding-mapping>
397 <encoding>ISO-8859-1</encoding>
398 </locale-encoding-mapping>
399 <locale-encoding-mapping>
401 <encoding>ISO-8859-1</encoding>
402 </locale-encoding-mapping>
403 <locale-encoding-mapping>
405 <encoding>ISO-8859-1</encoding>
406 </locale-encoding-mapping>
407 <locale-encoding-mapping>
409 <encoding>ISO-8859-1</encoding>
410 </locale-encoding-mapping>
411 <locale-encoding-mapping>
413 <encoding>ISO-8859-2</encoding>
414 </locale-encoding-mapping>
415 <locale-encoding-mapping>
417 <encoding>ISO-8859-2</encoding>
418 </locale-encoding-mapping>
419 <locale-encoding-mapping>
421 <encoding>ISO-8859-1</encoding>
422 </locale-encoding-mapping>
423 <locale-encoding-mapping>
425 <encoding>ISO-8859-1</encoding>
426 </locale-encoding-mapping>
427 <locale-encoding-mapping>
429 <encoding>ISO-8859-8</encoding>
430 </locale-encoding-mapping>
431 <locale-encoding-mapping>
433 <encoding>Shift_JIS</encoding>
434 </locale-encoding-mapping>
435 <locale-encoding-mapping>
437 <encoding>EUC-KR</encoding>
438 </locale-encoding-mapping>
439 <locale-encoding-mapping>
441 <encoding>ISO-8859-2</encoding>
442 </locale-encoding-mapping>
443 <locale-encoding-mapping>
445 <encoding>ISO-8859-2</encoding>
446 </locale-encoding-mapping>
447 <locale-encoding-mapping>
449 <encoding>ISO-8859-5</encoding>
450 </locale-encoding-mapping>
451 <locale-encoding-mapping>
453 <encoding>ISO-8859-1</encoding>
454 </locale-encoding-mapping>
455 <locale-encoding-mapping>
457 <encoding>ISO-8859-1</encoding>
458 </locale-encoding-mapping>
459 <locale-encoding-mapping>
461 <encoding>ISO-8859-2</encoding>
462 </locale-encoding-mapping>
463 <locale-encoding-mapping>
465 <encoding>ISO-8859-1</encoding>
466 </locale-encoding-mapping>
467 <locale-encoding-mapping>
469 <encoding>ISO-8859-2</encoding>
470 </locale-encoding-mapping>
471 <locale-encoding-mapping>
473 <encoding>ISO-8859-5</encoding>
474 </locale-encoding-mapping>
475 <locale-encoding-mapping>
477 <encoding>ISO-8859-5</encoding>
478 </locale-encoding-mapping>
479 <locale-encoding-mapping>
481 <encoding>ISO-8859-2</encoding>
482 </locale-encoding-mapping>
483 <locale-encoding-mapping>
485 <encoding>ISO-8859-2</encoding>
486 </locale-encoding-mapping>
487 <locale-encoding-mapping>
489 <encoding>ISO-8859-2</encoding>
490 </locale-encoding-mapping>
491 <locale-encoding-mapping>
493 <encoding>ISO-8859-5</encoding>
494 </locale-encoding-mapping>
495 <locale-encoding-mapping>
497 <encoding>ISO-8859-1</encoding>
498 </locale-encoding-mapping>
499 <locale-encoding-mapping>
501 <encoding>ISO-8859-9</encoding>
502 </locale-encoding-mapping>
503 <locale-encoding-mapping>
505 <encoding>ISO-8859-5</encoding>
506 </locale-encoding-mapping>
507 <locale-encoding-mapping>
509 <encoding>GB2312</encoding>
510 </locale-encoding-mapping>
511 <locale-encoding-mapping>
512 <locale>zh_TW</locale>
513 <encoding>Big5</encoding>
514 </locale-encoding-mapping>
515 </locale-encoding-mapping-list>
517 <security-constraint>
518 <web-resource-collection>
519 <web-resource-name>Disable TRACE</web-resource-name>
520 <url-pattern>/</url-pattern>
521 <http-method>TRACE</http-method>
522 </web-resource-collection>
524 </security-constraint>