Debian Codegraph @

jetty-ee9/jetty-ee9-webapp/src/main/config/etc/webdefault-ee9.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app
3 xmlns="http://xmlns.jcp.org/xml/ns/javaee"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
6 metadata-complete="false"
7 version="3.1">
8
9 <!-- ===================================================================== -->
10 <!-- This file contains the default descriptor for web applications. -->
11 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
12 <!-- The intent of this descriptor is to include jetty specific or common -->
13 <!-- configuration for all webapps. If a context has a webdefault-ee9.xml -->
14 <!-- descriptor, it is applied before the context's own web.xml file -->
15 <!-- -->
16 <!-- A context may be assigned a default descriptor by calling -->
17 <!-- WebAppContext.setDefaultsDescriptor(String). -->
18 <!-- -->
19 <!-- This file is present in the jetty-webapp.jar, and is used as the -->
20 <!-- defaults descriptor if no other is explicitly set on a context. -->
21 <!-- -->
22 <!-- A copy of this file is also placed into the $JETTY_HOME/etc dir of -->
23 <!-- the distribution, and is referenced by some of the other xml files, -->
24 <!-- eg the jetty-deploy.xml file. -->
25 <!-- ===================================================================== -->
26
27 <description>
28 Default web.xml file.
29 This file is applied to a Web application before its own WEB_INF/web.xml file
30 </description>
31
32 <!-- ==================================================================== -->
33 <!-- Removes static cache of Methods from java.beans.Introspector to -->
34 <!-- ensure webapp classloader can be released on undeploy -->
35 <!-- ==================================================================== -->
36 <listener>
37 <listener-class>org.eclipse.jetty.ee9.servlet.listener.IntrospectorCleaner</listener-class>
38 </listener>
39
40
41 <!-- ==================================================================== -->
42 <!-- Context params to control Session Cookies -->
43 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
44 <!--
45 UNCOMMENT TO ACTIVATE
46 <context-param>
47 <param-name>org.eclipse.jetty.session.SessionDomain</param-name>
48 <param-value>127.0.0.1</param-value>
49 </context-param>
50 <context-param>
51 <param-name>org.eclipse.jetty.session.SessionPath</param-name>
52 <param-value>/</param-value>
53 </context-param>
54 <context-param>
55 <param-name>org.eclipse.jetty.session.MaxAge</param-name>
56 <param-value>-1</param-value>
57 </context-param>
58 -->
59
60 <!-- ==================================================================== -->
61 <!-- The default servlet. -->
62 <!-- This servlet, normally mapped to /, provides the handling for static -->
63 <!-- content, OPTIONS and TRACE methods for the context. -->
64 <!-- The following initParameters are supported: -->
65 <!--
66 * acceptRanges If true, range requests and responses are
67 * supported
68 *
69 * dirAllowed If true, directory listings are returned if no
70 * welcome file is found. Else 403 Forbidden.
71 *
72 * welcomeServlets If true, attempt to dispatch to welcome files
73 * that are servlets, but only after no matching static
74 * resources could be found. If false, then a welcome
75 * file must exist on disk. If "exact", then exact
76 * servlet matches are supported without an existing file.
77 * Default is false.
78 *
79 * This must be false if you want directory listings,
80 * but have index.jsp in your welcome file list.
81 *
82 * redirectWelcome If true, welcome files are redirected rather than
83 * forwarded to.
84 *
85 * gzip If set to true, then static content will be served as
86 * gzip content encoded if a matching resource is
87 * found ending with ".gz" (default false)
88 * (deprecated: use precompressed)
89 *
90 * precompressed If set to a comma separated list of encoding types (that may be
91 * listed in a requests Accept-Encoding header) to file
92 * extension mappings to look for and serve. For example:
93 * "br=.br,gzip=.gz,bzip2=.bz".
94 * If set to a boolean True, then a default set of compressed formats
95 * will be used, otherwise no precompressed formats.
96 *
97 * baseResource Set to replace the context resource base
98 *
99 * resourceCache If set, this is a context attribute name, which the servlet
100 * will use to look for a shared ResourceCache instance.
101 *
102 * relativeBaseResource
103 * Set with a pathname relative to the base of the
104 * servlet context root. Useful for only serving static content out
105 * of only specific subdirectories.
106 *
107 * pathInfoOnly If true, only the path info will be applied to the baseResource
108 *
109 * stylesheet Set with the location of an optional stylesheet that will be used
110 * to decorate the directory listing html.
111 *
112 * etags If True, weak etags will be generated and handled.
113 *
114 * maxCacheSize The maximum total size of the cache or 0 for no cache.
115 * maxCachedFileSize The maximum size of a file to cache
116 * maxCachedFiles The maximum number of files to cache
117 *
118 * useFileMappedBuffer
119 * If set to true, it will use mapped file buffers to serve static content
120 * when using an NIO connector. Setting this value to false means that
121 * a direct buffer will be used instead of a mapped file buffer.
122 * This file sets the value to true.
123 *
124 * cacheControl If set, all static content will have this value set as the cache-control
125 * header.
126 *
127 * encodingHeaderCacheSize
128 * Max entries in a cache of ACCEPT-ENCODING headers.
129 *
130 * otherGzipFileExtensions
131 * defaults to .svgz but a comma separated list of gzip equivalent file extensions can be supplied
132 *
133 -->
134 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
135 <servlet>
136 <servlet-name>default</servlet-name>
137 <servlet-class>org.eclipse.jetty.ee9.servlet.DefaultServlet</servlet-class>
138 <init-param>
139 <param-name>acceptRanges</param-name>
140 <param-value>true</param-value>
141 </init-param>
142 <init-param>
143 <param-name>dirAllowed</param-name>
144 <param-value>true</param-value>
145 </init-param>
146 <init-param>
147 <param-name>welcomeServlets</param-name>
148 <param-value>false</param-value>
149 </init-param>
150 <init-param>
151 <param-name>redirectWelcome</param-name>
152 <param-value>false</param-value>
153 </init-param>
154 <init-param>
155 <param-name>maxCacheSize</param-name>
156 <param-value>256000000</param-value>
157 </init-param>
158 <init-param>
159 <param-name>maxCachedFileSize</param-name>
160 <param-value>200000000</param-value>
161 </init-param>
162 <init-param>
163 <param-name>maxCachedFiles</param-name>
164 <param-value>2048</param-value>
165 </init-param>
166 <init-param>
167 <param-name>etags</param-name>
168 <param-value>false</param-value>
169 </init-param>
170 <init-param>
171 <param-name>useFileMappedBuffer</param-name>
172 <param-value>true</param-value>
173 </init-param>
174 <load-on-startup>0</load-on-startup>
175 </servlet>
176
177 <servlet-mapping>
178 <servlet-name>default</servlet-name>
179 <url-pattern>/</url-pattern>
180 </servlet-mapping>
181
182
183 <!-- ==================================================================== -->
184 <!-- JSP Servlet -->
185 <!-- This is the jasper JSP servlet. -->
186 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
187 <!-- The JSP page compiler and execution servlet, which is the mechanism -->
188 <!-- used by the jsp container to support JSP pages. Traditionally, -->
189 <!-- this servlet is mapped to URL pattern "*.jsp". -->
190 <!-- See https://jetty.org/docs/ -->
191 <!-- for applicable configuration params. -->
192 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
193 <servlet id="jsp">
194 <servlet-name>jsp</servlet-name>
195 <servlet-class>org.eclipse.jetty.ee9.jsp.JettyJspServlet</servlet-class>
196 <init-param>
197 <param-name>xpoweredBy</param-name>
198 <param-value>false</param-value>
199 </init-param>
200 <init-param>
201 <param-name>compilerTargetVM</param-name>
202 <param-value>1.8</param-value>
203 </init-param>
204 <init-param>
205 <param-name>compilerSourceVM</param-name>
206 <param-value>1.8</param-value>
207 </init-param>
208 <load-on-startup>0</load-on-startup>
209 </servlet>
210
211 <servlet-mapping>
212 <servlet-name>jsp</servlet-name>
213 <url-pattern>*.jsp</url-pattern>
214 <url-pattern>*.jspf</url-pattern>
215 <url-pattern>*.jspx</url-pattern>
216 <url-pattern>*.xsp</url-pattern>
217 <url-pattern>*.JSP</url-pattern>
218 <url-pattern>*.JSPF</url-pattern>
219 <url-pattern>*.JSPX</url-pattern>
220 <url-pattern>*.XSP</url-pattern>
221 </servlet-mapping>
222
223
224 <!-- ==================================================================== -->
225 <!-- Default session configuration -->
226 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
227 <session-config>
228 <session-timeout>30</session-timeout>
229 </session-config>
230
231 <!-- ==================================================================== -->
232 <!-- Default MIME mappings -->
233 <!-- The default MIME mappings are provided by the mime.properties -->
234 <!-- resource in the jetty-http.jar file. Additional or modified -->
235 <!-- mappings may be specified here -->
236 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
237 <!-- UNCOMMENT TO ACTIVATE
238 <mime-mapping>
239 <extension>mysuffix</extension>
240 <mime-type>mymime/type</mime-type>
241 </mime-mapping>
242 -->
243
244 <!-- ==================================================================== -->
245 <!-- Default welcome files -->
246 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
247 <welcome-file-list>
248 <welcome-file>index.html</welcome-file>
249 <welcome-file>index.htm</welcome-file>
250 <welcome-file>index.jsp</welcome-file>
251 </welcome-file-list>
252
253 <!-- ==================================================================== -->
254 <!-- Default locale encodings -->
255 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
256 <locale-encoding-mapping-list>
257 <locale-encoding-mapping>
258 <locale>ar</locale>
259 <encoding>ISO-8859-6</encoding>
260 </locale-encoding-mapping>
261 <locale-encoding-mapping>
262 <locale>be</locale>
263 <encoding>ISO-8859-5</encoding>
264 </locale-encoding-mapping>
265 <locale-encoding-mapping>
266 <locale>bg</locale>
267 <encoding>ISO-8859-5</encoding>
268 </locale-encoding-mapping>
269 <locale-encoding-mapping>
270 <locale>ca</locale>
271 <encoding>ISO-8859-1</encoding>
272 </locale-encoding-mapping>
273 <locale-encoding-mapping>
274 <locale>cs</locale>
275 <encoding>ISO-8859-2</encoding>
276 </locale-encoding-mapping>
277 <locale-encoding-mapping>
278 <locale>da</locale>
279 <encoding>ISO-8859-1</encoding>
280 </locale-encoding-mapping>
281 <locale-encoding-mapping>
282 <locale>de</locale>
283 <encoding>ISO-8859-1</encoding>
284 </locale-encoding-mapping>
285 <locale-encoding-mapping>
286 <locale>el</locale>
287 <encoding>ISO-8859-7</encoding>
288 </locale-encoding-mapping>
289 <locale-encoding-mapping>
290 <locale>en</locale>
291 <encoding>ISO-8859-1</encoding>
292 </locale-encoding-mapping>
293 <locale-encoding-mapping>
294 <locale>es</locale>
295 <encoding>ISO-8859-1</encoding>
296 </locale-encoding-mapping>
297 <locale-encoding-mapping>
298 <locale>et</locale>
299 <encoding>ISO-8859-1</encoding>
300 </locale-encoding-mapping>
301 <locale-encoding-mapping>
302 <locale>fi</locale>
303 <encoding>ISO-8859-1</encoding>
304 </locale-encoding-mapping>
305 <locale-encoding-mapping>
306 <locale>fr</locale>
307 <encoding>ISO-8859-1</encoding>
308 </locale-encoding-mapping>
309 <locale-encoding-mapping>
310 <locale>hr</locale>
311 <encoding>ISO-8859-2</encoding>
312 </locale-encoding-mapping>
313 <locale-encoding-mapping>
314 <locale>hu</locale>
315 <encoding>ISO-8859-2</encoding>
316 </locale-encoding-mapping>
317 <locale-encoding-mapping>
318 <locale>is</locale>
319 <encoding>ISO-8859-1</encoding>
320 </locale-encoding-mapping>
321 <locale-encoding-mapping>
322 <locale>it</locale>
323 <encoding>ISO-8859-1</encoding>
324 </locale-encoding-mapping>
325 <locale-encoding-mapping>
326 <locale>iw</locale>
327 <encoding>ISO-8859-8</encoding>
328 </locale-encoding-mapping>
329 <locale-encoding-mapping>
330 <locale>ja</locale>
331 <encoding>Shift_JIS</encoding>
332 </locale-encoding-mapping>
333 <locale-encoding-mapping>
334 <locale>ko</locale>
335 <encoding>EUC-KR</encoding>
336 </locale-encoding-mapping>
337 <locale-encoding-mapping>
338 <locale>lt</locale>
339 <encoding>ISO-8859-2</encoding>
340 </locale-encoding-mapping>
341 <locale-encoding-mapping>
342 <locale>lv</locale>
343 <encoding>ISO-8859-2</encoding>
344 </locale-encoding-mapping>
345 <locale-encoding-mapping>
346 <locale>mk</locale>
347 <encoding>ISO-8859-5</encoding>
348 </locale-encoding-mapping>
349 <locale-encoding-mapping>
350 <locale>nl</locale>
351 <encoding>ISO-8859-1</encoding>
352 </locale-encoding-mapping>
353 <locale-encoding-mapping>
354 <locale>no</locale>
355 <encoding>ISO-8859-1</encoding>
356 </locale-encoding-mapping>
357 <locale-encoding-mapping>
358 <locale>pl</locale>
359 <encoding>ISO-8859-2</encoding>
360 </locale-encoding-mapping>
361 <locale-encoding-mapping>
362 <locale>pt</locale>
363 <encoding>ISO-8859-1</encoding>
364 </locale-encoding-mapping>
365 <locale-encoding-mapping>
366 <locale>ro</locale>
367 <encoding>ISO-8859-2</encoding>
368 </locale-encoding-mapping>
369 <locale-encoding-mapping>
370 <locale>ru</locale>
371 <encoding>ISO-8859-5</encoding>
372 </locale-encoding-mapping>
373 <locale-encoding-mapping>
374 <locale>sh</locale>
375 <encoding>ISO-8859-5</encoding>
376 </locale-encoding-mapping>
377 <locale-encoding-mapping>
378 <locale>sk</locale>
379 <encoding>ISO-8859-2</encoding>
380 </locale-encoding-mapping>
381 <locale-encoding-mapping>
382 <locale>sl</locale>
383 <encoding>ISO-8859-2</encoding>
384 </locale-encoding-mapping>
385 <locale-encoding-mapping>
386 <locale>sq</locale>
387 <encoding>ISO-8859-2</encoding>
388 </locale-encoding-mapping>
389 <locale-encoding-mapping>
390 <locale>sr</locale>
391 <encoding>ISO-8859-5</encoding>
392 </locale-encoding-mapping>
393 <locale-encoding-mapping>
394 <locale>sv</locale>
395 <encoding>ISO-8859-1</encoding>
396 </locale-encoding-mapping>
397 <locale-encoding-mapping>
398 <locale>tr</locale>
399 <encoding>ISO-8859-9</encoding>
400 </locale-encoding-mapping>
401 <locale-encoding-mapping>
402 <locale>uk</locale>
403 <encoding>ISO-8859-5</encoding>
404 </locale-encoding-mapping>
405 <locale-encoding-mapping>
406 <locale>zh</locale>
407 <encoding>GB2312</encoding>
408 </locale-encoding-mapping>
409 <locale-encoding-mapping>
410 <locale>zh_TW</locale>
411 <encoding>Big5</encoding>
412 </locale-encoding-mapping>
413 </locale-encoding-mapping-list>
414
415 <!-- ==================================================================== -->
416 <!-- Disable TRACE method with security constraint -->
417 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
418 <security-constraint>
419 <web-resource-collection>
420 <web-resource-name>Disable TRACE</web-resource-name>
421 <url-pattern>/</url-pattern>
422 <http-method>TRACE</http-method>
423 </web-resource-collection>
424 <auth-constraint/>
425 </security-constraint>
426 <security-constraint>
427 <web-resource-collection>
428 <web-resource-name>Enable everything but TRACE</web-resource-name>
429 <url-pattern>/</url-pattern>
430 <http-method-omission>TRACE</http-method-omission>
431 </web-resource-collection>
432 </security-constraint>
433
434 </web-app>
435