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 <!-- ==================================================================== -->
39 <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
43 <!-- ==================================================================== -->
44 <!-- Removes static cache of Methods from java.beans.Introspector to -->
45 <!-- ensure webapp classloader can be released on undeploy -->
46 <!-- ==================================================================== -->
49 <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
54 <!-- ==================================================================== -->
55 <!-- Context params to control Session Cookies -->
56 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
58 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>
59 <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>
60 <param-value>-1</param-value> </context-param>
63 <!-- ==================================================================== -->
64 <!-- The default servlet. -->
65 <!-- This servlet, normally mapped to /, provides the handling for static -->
66 <!-- content, OPTIONS and TRACE methods for the context. -->
67 <!-- The following initParameters are supported: -->
69 * acceptRanges If true, range requests and responses are
72 * dirAllowed If true, directory listings are returned if no
73 * welcome file is found. Else 403 Forbidden.
75 * welcomeServlets If true, attempt to dispatch to welcome files
76 * that are servlets, but only after no matching static
77 * resources could be found. If false, then a welcome
78 * file must exist on disk. If "exact", then exact
79 * servlet matches are supported without an existing file.
82 * This must be false if you want directory listings,
83 * but have index.jsp in your welcome file list.
85 * redirectWelcome If true, welcome files are redirected rather than
88 * gzip If set to true, then static content will be served as
89 * gzip content encoded if a matching resource is
90 * found ending with ".gz"
92 * resourceBase Set to replace the context resource base
94 * resourceCache If set, this is a context attribute name, which the servlet
95 * will use to look for a shared ResourceCache instance.
97 * relativeResourceBase
98 * Set with a pathname relative to the base of the
99 * servlet context root. Useful for only serving static content out
100 * of only specific subdirectories.
102 * aliases If True, aliases of resources are allowed (eg. symbolic
103 * links and caps variations). May bypass security constraints.
105 * maxCacheSize The maximum total size of the cache or 0 for no cache.
106 * maxCachedFileSize The maximum size of a file to cache
107 * maxCachedFiles The maximum number of files to cache
109 * useFileMappedBuffer
110 * If set to true, it will use mapped file buffer to serve static content
111 * when using NIO connector. Setting this value to false means that
112 * a direct buffer will be used instead of a mapped file buffer.
113 * By default, this is set to true.
115 * cacheControl If set, all static content will have this value set as the cache-control
120 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
122 <servlet-name>default</servlet-name>
123 <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
125 <param-name>aliases</param-name>
126 <param-value>false</param-value>
129 <param-name>acceptRanges</param-name>
130 <param-value>true</param-value>
133 <param-name>dirAllowed</param-name>
134 <param-value>true</param-value>
137 <param-name>welcomeServlets</param-name>
138 <param-value>false</param-value>
141 <param-name>redirectWelcome</param-name>
142 <param-value>false</param-value>
145 <param-name>maxCacheSize</param-name>
146 <param-value>256000000</param-value>
149 <param-name>maxCachedFileSize</param-name>
150 <param-value>200000000</param-value>
153 <param-name>maxCachedFiles</param-name>
154 <param-value>2048</param-value>
157 <param-name>gzip</param-name>
158 <param-value>true</param-value>
161 <param-name>useFileMappedBuffer</param-name>
162 <param-value>true</param-value>
166 <param-name>resourceCache</param-name>
167 <param-value>resourceCache</param-value>
172 <param-name>cacheControl</param-name>
173 <param-value>max-age=3600,public</param-value>
176 <load-on-startup>0</load-on-startup>
180 <servlet-name>default</servlet-name>
181 <url-pattern>/</url-pattern>
185 <!-- ==================================================================== -->
187 <!-- This is the jasper JSP servlet from the jakarta project -->
188 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
189 <!-- The JSP page compiler and execution servlet, which is the mechanism -->
190 <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
191 <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
192 <!-- following initialization parameters (default values are in square -->
195 <!-- checkInterval If development is false and reloading is true, -->
196 <!-- background compiles are enabled. checkInterval -->
197 <!-- is the time in seconds between checks to see -->
198 <!-- if a JSP page needs to be recompiled. [300] -->
200 <!-- compiler Which compiler Ant should use to compile JSP -->
201 <!-- pages. See the Ant documenation for more -->
202 <!-- information. [javac] -->
204 <!-- classdebuginfo Should the class file be compiled with -->
205 <!-- debugging information? [true] -->
207 <!-- classpath What class path should I use while compiling -->
208 <!-- generated servlets? [Created dynamically -->
209 <!-- based on the current web application] -->
210 <!-- Set to ? to make the container explicitly set -->
211 <!-- this parameter. -->
213 <!-- development Is Jasper used in development mode (will check -->
214 <!-- for JSP modification on every access)? [true] -->
216 <!-- enablePooling Determines whether tag handler pooling is -->
217 <!-- enabled [true] -->
219 <!-- fork Tell Ant to fork compiles of JSP pages so that -->
220 <!-- a separate JVM is used for JSP page compiles -->
221 <!-- from the one Tomcat is running in. [true] -->
223 <!-- ieClassId The class-id value to be sent to Internet -->
224 <!-- Explorer when using <jsp:plugin> tags. -->
225 <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
227 <!-- javaEncoding Java file encoding to use for generating java -->
228 <!-- source files. [UTF-8] -->
230 <!-- keepgenerated Should we keep the generated Java source code -->
231 <!-- for each page instead of deleting it? [true] -->
233 <!-- logVerbosityLevel The level of detailed messages to be produced -->
234 <!-- by this servlet. Increasing levels cause the -->
235 <!-- generation of more messages. Valid values are -->
236 <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
239 <!-- mappedfile Should we generate static content with one -->
240 <!-- print statement per input line, to ease -->
241 <!-- debugging? [false] -->
244 <!-- reloading Should Jasper check for modified JSPs? [true] -->
246 <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
247 <!-- debugging be suppressed? [false] -->
249 <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
250 <!-- dumped to a file? [false] -->
251 <!-- False if suppressSmap is true -->
253 <!-- scratchdir What scratch directory should we use when -->
254 <!-- compiling JSP pages? [default work directory -->
255 <!-- for the current web application] -->
257 <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
259 <!-- xpoweredBy Determines whether X-Powered-By response -->
260 <!-- header is added by generated servlet [false] -->
262 <!-- If you wish to use Jikes to compile JSP pages: -->
263 <!-- Set the init parameter "compiler" to "jikes". Define -->
264 <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
265 <!-- to cause Jikes to emit error messages in a format compatible with -->
267 <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
268 <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
269 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
273 <servlet-name>jsp</servlet-name>
274 <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
276 <param-name>logVerbosityLevel</param-name>
277 <param-value>DEBUG</param-value>
280 <param-name>fork</param-name>
281 <param-value>false</param-value>
284 <param-name>xpoweredBy</param-name>
285 <param-value>false</param-value>
290 <param-name>classpath</param-name>
291 <param-value>?</param-value>
294 <!-- <load-on-startup>0</load-on-startup>
298 <servlet-name>jsp</servlet-name>
299 <url-pattern>*.jsp</url-pattern>
300 <url-pattern>*.jspf</url-pattern>
301 <url-pattern>*.jspx</url-pattern>
302 <url-pattern>*.xsp</url-pattern>
303 <url-pattern>*.JSP</url-pattern>
304 <url-pattern>*.JSPF</url-pattern>
305 <url-pattern>*.JSPX</url-pattern>
306 <url-pattern>*.XSP</url-pattern>
307 </servlet-mapping>-->
309 <!-- ==================================================================== -->
310 <!-- Dynamic Servlet Invoker. -->
311 <!-- This servlet invokes anonymous servlets that have not been defined -->
312 <!-- in the web.xml or by other means. The first element of the pathInfo -->
313 <!-- of a request passed to the envoker is treated as a servlet name for -->
314 <!-- an existing servlet, or as a class name of a new servlet. -->
315 <!-- This servlet is normally mapped to /servlet/* -->
316 <!-- This servlet support the following initParams: -->
318 <!-- nonContextServlets If false, the invoker can only load -->
319 <!-- servlets from the contexts classloader. -->
320 <!-- This is false by default and setting this -->
321 <!-- to true may have security implications. -->
323 <!-- verbose If true, log dynamic loads -->
325 <!-- * All other parameters are copied to the -->
326 <!-- each dynamic servlet as init parameters -->
327 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
329 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>
330 <param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
331 <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>
332 <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
337 <!-- ==================================================================== -->
339 <session-timeout>30</session-timeout>
342 <!-- ==================================================================== -->
343 <!-- Default MIME mappings -->
344 <!-- The default MIME mappings are provided by the mime.properties -->
345 <!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified -->
346 <!-- mappings may be specified here -->
347 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
348 <!-- UNCOMMENT TO ACTIVATE
350 <extension>mysuffix</extension>
351 <mime-type>mymime/type</mime-type>
355 <!-- ==================================================================== -->
357 <welcome-file>index.html</welcome-file>
358 <welcome-file>index.htm</welcome-file>
359 <!--<welcome-file>index.jsp</welcome-file>-->
362 <!-- ==================================================================== -->
363 <locale-encoding-mapping-list>
364 <locale-encoding-mapping>
366 <encoding>ISO-8859-6</encoding>
367 </locale-encoding-mapping>
368 <locale-encoding-mapping>
370 <encoding>ISO-8859-5</encoding>
371 </locale-encoding-mapping>
372 <locale-encoding-mapping>
374 <encoding>ISO-8859-5</encoding>
375 </locale-encoding-mapping>
376 <locale-encoding-mapping>
378 <encoding>ISO-8859-1</encoding>
379 </locale-encoding-mapping>
380 <locale-encoding-mapping>
382 <encoding>ISO-8859-2</encoding>
383 </locale-encoding-mapping>
384 <locale-encoding-mapping>
386 <encoding>ISO-8859-1</encoding>
387 </locale-encoding-mapping>
388 <locale-encoding-mapping>
390 <encoding>ISO-8859-1</encoding>
391 </locale-encoding-mapping>
392 <locale-encoding-mapping>
394 <encoding>ISO-8859-7</encoding>
395 </locale-encoding-mapping>
396 <locale-encoding-mapping>
398 <encoding>ISO-8859-1</encoding>
399 </locale-encoding-mapping>
400 <locale-encoding-mapping>
402 <encoding>ISO-8859-1</encoding>
403 </locale-encoding-mapping>
404 <locale-encoding-mapping>
406 <encoding>ISO-8859-1</encoding>
407 </locale-encoding-mapping>
408 <locale-encoding-mapping>
410 <encoding>ISO-8859-1</encoding>
411 </locale-encoding-mapping>
412 <locale-encoding-mapping>
414 <encoding>ISO-8859-1</encoding>
415 </locale-encoding-mapping>
416 <locale-encoding-mapping>
418 <encoding>ISO-8859-2</encoding>
419 </locale-encoding-mapping>
420 <locale-encoding-mapping>
422 <encoding>ISO-8859-2</encoding>
423 </locale-encoding-mapping>
424 <locale-encoding-mapping>
426 <encoding>ISO-8859-1</encoding>
427 </locale-encoding-mapping>
428 <locale-encoding-mapping>
430 <encoding>ISO-8859-1</encoding>
431 </locale-encoding-mapping>
432 <locale-encoding-mapping>
434 <encoding>ISO-8859-8</encoding>
435 </locale-encoding-mapping>
436 <locale-encoding-mapping>
438 <encoding>Shift_JIS</encoding>
439 </locale-encoding-mapping>
440 <locale-encoding-mapping>
442 <encoding>EUC-KR</encoding>
443 </locale-encoding-mapping>
444 <locale-encoding-mapping>
446 <encoding>ISO-8859-2</encoding>
447 </locale-encoding-mapping>
448 <locale-encoding-mapping>
450 <encoding>ISO-8859-2</encoding>
451 </locale-encoding-mapping>
452 <locale-encoding-mapping>
454 <encoding>ISO-8859-5</encoding>
455 </locale-encoding-mapping>
456 <locale-encoding-mapping>
458 <encoding>ISO-8859-1</encoding>
459 </locale-encoding-mapping>
460 <locale-encoding-mapping>
462 <encoding>ISO-8859-1</encoding>
463 </locale-encoding-mapping>
464 <locale-encoding-mapping>
466 <encoding>ISO-8859-2</encoding>
467 </locale-encoding-mapping>
468 <locale-encoding-mapping>
470 <encoding>ISO-8859-1</encoding>
471 </locale-encoding-mapping>
472 <locale-encoding-mapping>
474 <encoding>ISO-8859-2</encoding>
475 </locale-encoding-mapping>
476 <locale-encoding-mapping>
478 <encoding>ISO-8859-5</encoding>
479 </locale-encoding-mapping>
480 <locale-encoding-mapping>
482 <encoding>ISO-8859-5</encoding>
483 </locale-encoding-mapping>
484 <locale-encoding-mapping>
486 <encoding>ISO-8859-2</encoding>
487 </locale-encoding-mapping>
488 <locale-encoding-mapping>
490 <encoding>ISO-8859-2</encoding>
491 </locale-encoding-mapping>
492 <locale-encoding-mapping>
494 <encoding>ISO-8859-2</encoding>
495 </locale-encoding-mapping>
496 <locale-encoding-mapping>
498 <encoding>ISO-8859-5</encoding>
499 </locale-encoding-mapping>
500 <locale-encoding-mapping>
502 <encoding>ISO-8859-1</encoding>
503 </locale-encoding-mapping>
504 <locale-encoding-mapping>
506 <encoding>ISO-8859-9</encoding>
507 </locale-encoding-mapping>
508 <locale-encoding-mapping>
510 <encoding>ISO-8859-5</encoding>
511 </locale-encoding-mapping>
512 <locale-encoding-mapping>
514 <encoding>GB2312</encoding>
515 </locale-encoding-mapping>
516 <locale-encoding-mapping>
517 <locale>zh_TW</locale>
518 <encoding>Big5</encoding>
519 </locale-encoding-mapping>
520 </locale-encoding-mapping-list>
522 <security-constraint>
523 <web-resource-collection>
524 <web-resource-name>Disable TRACE</web-resource-name>
525 <url-pattern>/</url-pattern>
526 <http-method>TRACE</http-method>
527 </web-resource-collection>
529 </security-constraint>