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
34 <!-- ==================================================================== -->
35 <!-- Context params to control Session Cookies -->
36 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
38 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>
39 <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>
40 <param-value>-1</param-value> </context-param>
44 <!-- ==================================================================== -->
45 <!-- The default servlet. -->
46 <!-- This servlet, normally mapped to /, provides the handling for static -->
47 <!-- content, OPTIONS and TRACE methods for the context. -->
48 <!-- The following initParameters are supported: -->
50 <!-- aliases If true, aliases like symlinks are allowed. Note -->
51 <!-- that security constraints might be bypassed by -->
52 <!-- aliases static content. -->
54 <!-- acceptRanges If true, range requests and responses are -->
57 <!-- dirAllowed If true, directory listings are returned if no -->
58 <!-- welcome file is found. Else 403 Forbidden. -->
60 <!-- welcomeServlets If true, attempt to dispatch to welcome files -->
61 <!-- that are servlets, if no matching static -->
62 <!-- resources can be found. -->
64 <!-- redirectWelcome If true, redirect welcome file requests -->
65 <!-- else use request dispatcher forwards -->
67 <!-- gzip If set to true, then static content will be served-->
68 <!-- as gzip content encoded if a matching resource is -->
69 <!-- found ending with ".gz" -->
71 <!-- resoureBase Can be set to replace the context resource base -->
73 <!-- relativeResourceBase -->
74 <!-- Set with a pathname relative to the base of the -->
75 <!-- servlet context root. Useful for only serving -->
76 <!-- static content from only specific subdirectories. -->
78 <!-- useFileMappedBuffer -->
79 <!-- If set to true (the default), a memory mapped -->
80 <!-- file buffer will be used to serve static content -->
81 <!-- when using an NIO connector. Setting this value -->
82 <!-- to false means that a direct buffer will be used -->
83 <!-- instead. If you are having trouble with Windows -->
84 <!-- file locking, set this to false. -->
86 <!-- cacheControl If set, all static content will have this value -->
87 <!-- set as the cache-control header. -->
89 <!-- maxCacheSize Maximum size of the static resource cache -->
91 <!-- maxCachedFileSize Maximum size of any single file in the cache -->
93 <!-- maxCachedFiles Maximum number of files in the cache -->
95 <!-- cacheType "nio", "bio" or "both" to determine the type(s) -->
96 <!-- of resource cache. A bio cached buffer may be used-->
97 <!-- by nio but is not as efficient as a nio buffer. -->
98 <!-- An nio cached buffer may not be used by bio. -->
100 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
102 <servlet-name>default</servlet-name>
103 <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
105 <param-name>aliases</param-name>
106 <param-value>false</param-value>
109 <param-name>acceptRanges</param-name>
110 <param-value>true</param-value>
113 <param-name>dirAllowed</param-name>
114 <param-value>true</param-value>
117 <param-name>welcomeServlets</param-name>
118 <param-value>false</param-value>
121 <param-name>redirectWelcome</param-name>
122 <param-value>false</param-value>
125 <param-name>maxCacheSize</param-name>
126 <param-value>256000000</param-value>
129 <param-name>maxCachedFileSize</param-name>
130 <param-value>10000000</param-value>
133 <param-name>maxCachedFiles</param-name>
134 <param-value>1000</param-value>
137 <param-name>cacheType</param-name>
138 <param-value>both</param-value>
141 <param-name>gzip</param-name>
142 <param-value>true</param-value>
145 <param-name>useFileMappedBuffer</param-name>
146 <param-value>false</param-value>
150 <param-name>cacheControl</param-name>
151 <param-value>max-age=3600,public</param-value>
154 <load-on-startup>0</load-on-startup>
158 <servlet-name>default</servlet-name>
159 <url-pattern>/</url-pattern>
163 <!-- ==================================================================== -->
165 <!-- This is the jasper JSP servlet from the jakarta project -->
166 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
167 <!-- The JSP page compiler and execution servlet, which is the mechanism -->
168 <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
169 <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
170 <!-- following initialization parameters (default values are in square -->
173 <!-- checkInterval If development is false and reloading is true, -->
174 <!-- background compiles are enabled. checkInterval -->
175 <!-- is the time in seconds between checks to see -->
176 <!-- if a JSP page needs to be recompiled. [300] -->
178 <!-- compiler Which compiler Ant should use to compile JSP -->
179 <!-- pages. See the Ant documenation for more -->
180 <!-- information. [javac] -->
182 <!-- classdebuginfo Should the class file be compiled with -->
183 <!-- debugging information? [true] -->
185 <!-- classpath What class path should I use while compiling -->
186 <!-- generated servlets? [Created dynamically -->
187 <!-- based on the current web application] -->
188 <!-- Set to ? to make the container explicitly set -->
189 <!-- this parameter. -->
191 <!-- development Is Jasper used in development mode (will check -->
192 <!-- for JSP modification on every access)? [true] -->
194 <!-- enablePooling Determines whether tag handler pooling is -->
195 <!-- enabled [true] -->
197 <!-- fork Tell Ant to fork compiles of JSP pages so that -->
198 <!-- a separate JVM is used for JSP page compiles -->
199 <!-- from the one Tomcat is running in. [true] -->
201 <!-- ieClassId The class-id value to be sent to Internet -->
202 <!-- Explorer when using <jsp:plugin> tags. -->
203 <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
205 <!-- javaEncoding Java file encoding to use for generating java -->
206 <!-- source files. [UTF-8] -->
208 <!-- keepgenerated Should we keep the generated Java source code -->
209 <!-- for each page instead of deleting it? [true] -->
211 <!-- logVerbosityLevel The level of detailed messages to be produced -->
212 <!-- by this servlet. Increasing levels cause the -->
213 <!-- generation of more messages. Valid values are -->
214 <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
217 <!-- mappedfile Should we generate static content with one -->
218 <!-- print statement per input line, to ease -->
219 <!-- debugging? [false] -->
222 <!-- reloading Should Jasper check for modified JSPs? [true] -->
224 <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
225 <!-- debugging be suppressed? [false] -->
227 <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
228 <!-- dumped to a file? [false] -->
229 <!-- False if suppressSmap is true -->
231 <!-- scratchdir What scratch directory should we use when -->
232 <!-- compiling JSP pages? [default work directory -->
233 <!-- for the current web application] -->
235 <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
237 <!-- xpoweredBy Determines whether X-Powered-By response -->
238 <!-- header is added by generated servlet [false] -->
240 <!-- If you wish to use Jikes to compile JSP pages: -->
241 <!-- Set the init parameter "compiler" to "jikes". Define -->
242 <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
243 <!-- to cause Jikes to emit error messages in a format compatible with -->
245 <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
246 <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
247 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
251 <servlet-name>jsp</servlet-name>
252 <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
254 <param-name>logVerbosityLevel</param-name>
255 <param-value>DEBUG</param-value>
258 <param-name>fork</param-name>
259 <param-value>false</param-value>
262 <param-name>xpoweredBy</param-name>
263 <param-value>false</param-value>
267 <param-name>classpath</param-name>
268 <param-value>?</param-value>
271 <load-on-startup>0</load-on-startup>
275 <servlet-name>jsp</servlet-name>
276 <url-pattern>*.jsp</url-pattern>
277 <url-pattern>*.jspf</url-pattern>
278 <url-pattern>*.jspx</url-pattern>
279 <url-pattern>*.xsp</url-pattern>
280 <url-pattern>*.JSP</url-pattern>
281 <url-pattern>*.JSPF</url-pattern>
282 <url-pattern>*.JSPX</url-pattern>
283 <url-pattern>*.XSP</url-pattern>
286 <!-- ==================================================================== -->
287 <!-- Dynamic Servlet Invoker. -->
288 <!-- This servlet invokes anonymous servlets that have not been defined -->
289 <!-- in the web.xml or by other means. The first element of the pathInfo -->
290 <!-- of a request passed to the envoker is treated as a servlet name for -->
291 <!-- an existing servlet, or as a class name of a new servlet. -->
292 <!-- This servlet is normally mapped to /servlet/* -->
293 <!-- This servlet support the following initParams: -->
295 <!-- nonContextServlets If false, the invoker can only load -->
296 <!-- servlets from the contexts classloader. -->
297 <!-- This is false by default and setting this -->
298 <!-- to true may have security implications. -->
300 <!-- verbose If true, log dynamic loads -->
302 <!-- * All other parameters are copied to the -->
303 <!-- each dynamic servlet as init parameters -->
304 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
306 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>
307 <param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
308 <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>
309 <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
314 <!-- ==================================================================== -->
316 <session-timeout>30</session-timeout>
319 <!-- ==================================================================== -->
320 <!-- Default MIME mappings -->
321 <!-- The default MIME mappings are provided by the mime.properties -->
322 <!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified -->
323 <!-- mappings may be specified here -->
324 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
325 <!-- UNCOMMENT TO ACTIVATE
327 <extension>mysuffix</extension>
328 <mime-type>mymime/type</mime-type>
332 <!-- ==================================================================== -->
334 <welcome-file>index.html</welcome-file>
335 <welcome-file>index.htm</welcome-file>
336 <welcome-file>index.jsp</welcome-file>
339 <!-- ==================================================================== -->
340 <locale-encoding-mapping-list>
341 <locale-encoding-mapping>
343 <encoding>ISO-8859-6</encoding>
344 </locale-encoding-mapping>
345 <locale-encoding-mapping>
347 <encoding>ISO-8859-5</encoding>
348 </locale-encoding-mapping>
349 <locale-encoding-mapping>
351 <encoding>ISO-8859-5</encoding>
352 </locale-encoding-mapping>
353 <locale-encoding-mapping>
355 <encoding>ISO-8859-1</encoding>
356 </locale-encoding-mapping>
357 <locale-encoding-mapping>
359 <encoding>ISO-8859-2</encoding>
360 </locale-encoding-mapping>
361 <locale-encoding-mapping>
363 <encoding>ISO-8859-1</encoding>
364 </locale-encoding-mapping>
365 <locale-encoding-mapping>
367 <encoding>ISO-8859-1</encoding>
368 </locale-encoding-mapping>
369 <locale-encoding-mapping>
371 <encoding>ISO-8859-7</encoding>
372 </locale-encoding-mapping>
373 <locale-encoding-mapping>
375 <encoding>ISO-8859-1</encoding>
376 </locale-encoding-mapping>
377 <locale-encoding-mapping>
379 <encoding>ISO-8859-1</encoding>
380 </locale-encoding-mapping>
381 <locale-encoding-mapping>
383 <encoding>ISO-8859-1</encoding>
384 </locale-encoding-mapping>
385 <locale-encoding-mapping>
387 <encoding>ISO-8859-1</encoding>
388 </locale-encoding-mapping>
389 <locale-encoding-mapping>
391 <encoding>ISO-8859-1</encoding>
392 </locale-encoding-mapping>
393 <locale-encoding-mapping>
395 <encoding>ISO-8859-2</encoding>
396 </locale-encoding-mapping>
397 <locale-encoding-mapping>
399 <encoding>ISO-8859-2</encoding>
400 </locale-encoding-mapping>
401 <locale-encoding-mapping>
403 <encoding>ISO-8859-1</encoding>
404 </locale-encoding-mapping>
405 <locale-encoding-mapping>
407 <encoding>ISO-8859-1</encoding>
408 </locale-encoding-mapping>
409 <locale-encoding-mapping>
411 <encoding>ISO-8859-8</encoding>
412 </locale-encoding-mapping>
413 <locale-encoding-mapping>
415 <encoding>Shift_JIS</encoding>
416 </locale-encoding-mapping>
417 <locale-encoding-mapping>
419 <encoding>EUC-KR</encoding>
420 </locale-encoding-mapping>
421 <locale-encoding-mapping>
423 <encoding>ISO-8859-2</encoding>
424 </locale-encoding-mapping>
425 <locale-encoding-mapping>
427 <encoding>ISO-8859-2</encoding>
428 </locale-encoding-mapping>
429 <locale-encoding-mapping>
431 <encoding>ISO-8859-5</encoding>
432 </locale-encoding-mapping>
433 <locale-encoding-mapping>
435 <encoding>ISO-8859-1</encoding>
436 </locale-encoding-mapping>
437 <locale-encoding-mapping>
439 <encoding>ISO-8859-1</encoding>
440 </locale-encoding-mapping>
441 <locale-encoding-mapping>
443 <encoding>ISO-8859-2</encoding>
444 </locale-encoding-mapping>
445 <locale-encoding-mapping>
447 <encoding>ISO-8859-1</encoding>
448 </locale-encoding-mapping>
449 <locale-encoding-mapping>
451 <encoding>ISO-8859-2</encoding>
452 </locale-encoding-mapping>
453 <locale-encoding-mapping>
455 <encoding>ISO-8859-5</encoding>
456 </locale-encoding-mapping>
457 <locale-encoding-mapping>
459 <encoding>ISO-8859-5</encoding>
460 </locale-encoding-mapping>
461 <locale-encoding-mapping>
463 <encoding>ISO-8859-2</encoding>
464 </locale-encoding-mapping>
465 <locale-encoding-mapping>
467 <encoding>ISO-8859-2</encoding>
468 </locale-encoding-mapping>
469 <locale-encoding-mapping>
471 <encoding>ISO-8859-2</encoding>
472 </locale-encoding-mapping>
473 <locale-encoding-mapping>
475 <encoding>ISO-8859-5</encoding>
476 </locale-encoding-mapping>
477 <locale-encoding-mapping>
479 <encoding>ISO-8859-1</encoding>
480 </locale-encoding-mapping>
481 <locale-encoding-mapping>
483 <encoding>ISO-8859-9</encoding>
484 </locale-encoding-mapping>
485 <locale-encoding-mapping>
487 <encoding>ISO-8859-5</encoding>
488 </locale-encoding-mapping>
489 <locale-encoding-mapping>
491 <encoding>GB2312</encoding>
492 </locale-encoding-mapping>
493 <locale-encoding-mapping>
494 <locale>zh_TW</locale>
495 <encoding>Big5</encoding>
496 </locale-encoding-mapping>
497 </locale-encoding-mapping-list>
499 <security-constraint>
500 <web-resource-collection>
501 <web-resource-name>Disable TRACE</web-resource-name>
502 <url-pattern>/</url-pattern>
503 <http-method>TRACE</http-method>
504 </web-resource-collection>
506 </security-constraint>