Debian Codegraph @

jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-embedded/src/main/resources/demo/webdefault-ee10.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app
3 xmlns="https://jakarta.ee/xml/ns/jakartaee"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
6 metadata-complete="false"
7 version="6.0">
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-ee10.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.ee10.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 * stylesheet Set with the location of an optional stylesheet that will be used
108 * to decorate the directory listing html.
109 *
110 * etags If True, weak etags will be generated and handled.
111 *
112 * maxCacheSize The maximum total size of the cache or 0 for no cache.
113 * maxCachedFileSize The maximum size of a file to cache
114 * maxCachedFiles The maximum number of files to cache
115 *
116 * useFileMappedBuffer
117 * If set to true, it will use mapped file buffers to serve static content
118 * when using an NIO connector. Setting this value to false means that
119 * a direct buffer will be used instead of a mapped file buffer.
120 * This file sets the value to true.
121 *
122 * cacheControl If set, all static content will have this value set as the cache-control
123 * header.
124 *
125 * encodingHeaderCacheSize
126 * Max entries in a cache of ACCEPT-ENCODING headers.
127 *
128 * otherGzipFileExtensions
129 * defaults to .svgz but a comma separated list of gzip equivalent file extensions can be supplied
130 *
131 -->
132 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
133 <servlet>
134 <servlet-name>default</servlet-name>
135 <servlet-class>org.eclipse.jetty.ee10.servlet.DefaultServlet</servlet-class>
136 <init-param>
137 <param-name>acceptRanges</param-name>
138 <param-value>true</param-value>
139 </init-param>
140 <init-param>
141 <param-name>dirAllowed</param-name>
142 <param-value>true</param-value>
143 </init-param>
144 <init-param>
145 <param-name>welcomeServlets</param-name>
146 <param-value>false</param-value>
147 </init-param>
148 <init-param>
149 <param-name>redirectWelcome</param-name>
150 <param-value>false</param-value>
151 </init-param>
152 <init-param>
153 <param-name>maxCacheSize</param-name>
154 <param-value>256000000</param-value>
155 </init-param>
156 <init-param>
157 <param-name>maxCachedFileSize</param-name>
158 <param-value>200000000</param-value>
159 </init-param>
160 <init-param>
161 <param-name>maxCachedFiles</param-name>
162 <param-value>2048</param-value>
163 </init-param>
164 <init-param>
165 <param-name>etags</param-name>
166 <param-value>false</param-value>
167 </init-param>
168 <init-param>
169 <param-name>useFileMappedBuffer</param-name>
170 <param-value>true</param-value>
171 </init-param>
172 <load-on-startup>0</load-on-startup>
173 </servlet>
174
175 <servlet-mapping>
176 <servlet-name>default</servlet-name>
177 <url-pattern>/</url-pattern>
178 </servlet-mapping>
179
180
181 <!-- ==================================================================== -->
182 <!-- JSP Servlet -->
183 <!-- This is the jasper JSP servlet. -->
184 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
185 <!-- The JSP page compiler and execution servlet, which is the mechanism -->
186 <!-- used by the jsp container to support JSP pages. Traditionally, -->
187 <!-- this servlet is mapped to URL pattern "*.jsp". -->
188 <!-- See https://jetty.org/docs/ -->
189 <!-- for applicable configuration params. -->
190 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
191 <servlet id="jsp">
192 <servlet-name>jsp</servlet-name>
193 <servlet-class>org.eclipse.jetty.jsp.JettyJspServlet</servlet-class>
194 <init-param>
195 <param-name>xpoweredBy</param-name>
196 <param-value>false</param-value>
197 </init-param>
198 <init-param>
199 <param-name>compilerTargetVM</param-name>
200 <param-value>1.8</param-value>
201 </init-param>
202 <init-param>
203 <param-name>compilerSourceVM</param-name>
204 <param-value>1.8</param-value>
205 </init-param>
206 <load-on-startup>0</load-on-startup>
207 </servlet>
208
209 <servlet-mapping>
210 <servlet-name>jsp</servlet-name>
211 <url-pattern>*.jsp</url-pattern>
212 <url-pattern>*.jspf</url-pattern>
213 <url-pattern>*.jspx</url-pattern>
214 <url-pattern>*.xsp</url-pattern>
215 <url-pattern>*.JSP</url-pattern>
216 <url-pattern>*.JSPF</url-pattern>
217 <url-pattern>*.JSPX</url-pattern>
218 <url-pattern>*.XSP</url-pattern>
219 </servlet-mapping>
220
221
222 <!-- ==================================================================== -->
223 <!-- Default session configuration -->
224 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
225 <session-config>
226 <session-timeout>30</session-timeout>
227 </session-config>
228
229 <!-- ==================================================================== -->
230 <!-- Default MIME mappings -->
231 <!-- The default MIME mappings are provided by the mime.properties -->
232 <!-- resource in the jetty-http.jar file. Additional or modified -->
233 <!-- mappings may be specified here -->
234 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
235 <!-- UNCOMMENT TO ACTIVATE
236 <mime-mapping>
237 <extension>mysuffix</extension>
238 <mime-type>mymime/type</mime-type>
239 </mime-mapping>
240 -->
241
242 <!-- ==================================================================== -->
243 <!-- Default welcome files -->
244 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
245 <welcome-file-list>
246 <welcome-file>index.html</welcome-file>
247 <welcome-file>index.htm</welcome-file>
248 <welcome-file>index.jsp</welcome-file>
249 </welcome-file-list>
250
251 <!-- ==================================================================== -->
252 <!-- Default locale encodings -->
253 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
254 <locale-encoding-mapping-list>
255 <locale-encoding-mapping>
256 <locale>ar</locale>
257 <encoding>ISO-8859-6</encoding>
258 </locale-encoding-mapping>
259 <locale-encoding-mapping>
260 <locale>be</locale>
261 <encoding>ISO-8859-5</encoding>
262 </locale-encoding-mapping>
263 <locale-encoding-mapping>
264 <locale>bg</locale>
265 <encoding>ISO-8859-5</encoding>
266 </locale-encoding-mapping>
267 <locale-encoding-mapping>
268 <locale>ca</locale>
269 <encoding>ISO-8859-1</encoding>
270 </locale-encoding-mapping>
271 <locale-encoding-mapping>
272 <locale>cs</locale>
273 <encoding>ISO-8859-2</encoding>
274 </locale-encoding-mapping>
275 <locale-encoding-mapping>
276 <locale>da</locale>
277 <encoding>ISO-8859-1</encoding>
278 </locale-encoding-mapping>
279 <locale-encoding-mapping>
280 <locale>de</locale>
281 <encoding>ISO-8859-1</encoding>
282 </locale-encoding-mapping>
283 <locale-encoding-mapping>
284 <locale>el</locale>
285 <encoding>ISO-8859-7</encoding>
286 </locale-encoding-mapping>
287 <locale-encoding-mapping>
288 <locale>en</locale>
289 <encoding>ISO-8859-1</encoding>
290 </locale-encoding-mapping>
291 <locale-encoding-mapping>
292 <locale>es</locale>
293 <encoding>ISO-8859-1</encoding>
294 </locale-encoding-mapping>
295 <locale-encoding-mapping>
296 <locale>et</locale>
297 <encoding>ISO-8859-1</encoding>
298 </locale-encoding-mapping>
299 <locale-encoding-mapping>
300 <locale>fi</locale>
301 <encoding>ISO-8859-1</encoding>
302 </locale-encoding-mapping>
303 <locale-encoding-mapping>
304 <locale>fr</locale>
305 <encoding>ISO-8859-1</encoding>
306 </locale-encoding-mapping>
307 <locale-encoding-mapping>
308 <locale>hr</locale>
309 <encoding>ISO-8859-2</encoding>
310 </locale-encoding-mapping>
311 <locale-encoding-mapping>
312 <locale>hu</locale>
313 <encoding>ISO-8859-2</encoding>
314 </locale-encoding-mapping>
315 <locale-encoding-mapping>
316 <locale>is</locale>
317 <encoding>ISO-8859-1</encoding>
318 </locale-encoding-mapping>
319 <locale-encoding-mapping>
320 <locale>it</locale>
321 <encoding>ISO-8859-1</encoding>
322 </locale-encoding-mapping>
323 <locale-encoding-mapping>
324 <locale>iw</locale>
325 <encoding>ISO-8859-8</encoding>
326 </locale-encoding-mapping>
327 <locale-encoding-mapping>
328 <locale>ja</locale>
329 <encoding>Shift_JIS</encoding>
330 </locale-encoding-mapping>
331 <locale-encoding-mapping>
332 <locale>ko</locale>
333 <encoding>EUC-KR</encoding>
334 </locale-encoding-mapping>
335 <locale-encoding-mapping>
336 <locale>lt</locale>
337 <encoding>ISO-8859-2</encoding>
338 </locale-encoding-mapping>
339 <locale-encoding-mapping>
340 <locale>lv</locale>
341 <encoding>ISO-8859-2</encoding>
342 </locale-encoding-mapping>
343 <locale-encoding-mapping>
344 <locale>mk</locale>
345 <encoding>ISO-8859-5</encoding>
346 </locale-encoding-mapping>
347 <locale-encoding-mapping>
348 <locale>nl</locale>
349 <encoding>ISO-8859-1</encoding>
350 </locale-encoding-mapping>
351 <locale-encoding-mapping>
352 <locale>no</locale>
353 <encoding>ISO-8859-1</encoding>
354 </locale-encoding-mapping>
355 <locale-encoding-mapping>
356 <locale>pl</locale>
357 <encoding>ISO-8859-2</encoding>
358 </locale-encoding-mapping>
359 <locale-encoding-mapping>
360 <locale>pt</locale>
361 <encoding>ISO-8859-1</encoding>
362 </locale-encoding-mapping>
363 <locale-encoding-mapping>
364 <locale>ro</locale>
365 <encoding>ISO-8859-2</encoding>
366 </locale-encoding-mapping>
367 <locale-encoding-mapping>
368 <locale>ru</locale>
369 <encoding>ISO-8859-5</encoding>
370 </locale-encoding-mapping>
371 <locale-encoding-mapping>
372 <locale>sh</locale>
373 <encoding>ISO-8859-5</encoding>
374 </locale-encoding-mapping>
375 <locale-encoding-mapping>
376 <locale>sk</locale>
377 <encoding>ISO-8859-2</encoding>
378 </locale-encoding-mapping>
379 <locale-encoding-mapping>
380 <locale>sl</locale>
381 <encoding>ISO-8859-2</encoding>
382 </locale-encoding-mapping>
383 <locale-encoding-mapping>
384 <locale>sq</locale>
385 <encoding>ISO-8859-2</encoding>
386 </locale-encoding-mapping>
387 <locale-encoding-mapping>
388 <locale>sr</locale>
389 <encoding>ISO-8859-5</encoding>
390 </locale-encoding-mapping>
391 <locale-encoding-mapping>
392 <locale>sv</locale>
393 <encoding>ISO-8859-1</encoding>
394 </locale-encoding-mapping>
395 <locale-encoding-mapping>
396 <locale>tr</locale>
397 <encoding>ISO-8859-9</encoding>
398 </locale-encoding-mapping>
399 <locale-encoding-mapping>
400 <locale>uk</locale>
401 <encoding>ISO-8859-5</encoding>
402 </locale-encoding-mapping>
403 <locale-encoding-mapping>
404 <locale>zh</locale>
405 <encoding>GB2312</encoding>
406 </locale-encoding-mapping>
407 <locale-encoding-mapping>
408 <locale>zh_TW</locale>
409 <encoding>Big5</encoding>
410 </locale-encoding-mapping>
411 </locale-encoding-mapping-list>
412
413 <!-- ==================================================================== -->
414 <!-- Disable TRACE method with security constraint -->
415 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
416 <security-constraint>
417 <web-resource-collection>
418 <web-resource-name>Disable TRACE</web-resource-name>
419 <url-pattern>/</url-pattern>
420 <http-method>TRACE</http-method>
421 </web-resource-collection>
422 <auth-constraint/>
423 </security-constraint>
424 <security-constraint>
425 <web-resource-collection>
426 <web-resource-name>Enable everything but TRACE</web-resource-name>
427 <url-pattern>/</url-pattern>
428 <http-method-omission>TRACE</http-method-omission>
429 </web-resource-collection>
430 </security-constraint>
431
432 </web-app>
433