webdefault.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!-- ===================================================================== -->
  3. <!-- This file contains the default descriptor for web applications. -->
  4. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  5. <!-- The intent of this descriptor is to include jetty specific or common -->
  6. <!-- configuration for all webapps. If a context has a webdefault.xml -->
  7. <!-- descriptor, it is applied before the contexts own web.xml file -->
  8. <!-- -->
  9. <!-- A context may be assigned a default descriptor by: -->
  10. <!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
  11. <!-- + Passed an arg to addWebApplications -->
  12. <!-- -->
  13. <!-- This file is used both as the resource within the jetty.jar (which is -->
  14. <!-- used as the default if no explicit defaults descriptor is set) and it -->
  15. <!-- is copied to the etc directory of the Jetty distro and explicitly -->
  16. <!-- by the jetty.xml file. -->
  17. <!-- -->
  18. <!-- ===================================================================== -->
  19. <web-app
  20. xmlns="http://java.sun.com/xml/ns/javaee"
  21. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  23. metadata-complete="true"
  24. version="2.5"
  25. >
  26. <description>
  27. Default web.xml file.
  28. This file is applied to a Web application before its own WEB_INF/web.xml file
  29. </description>
  30. <!-- ==================================================================== -->
  31. <!-- Removes static references to beans from javax.el.BeanELResolver to -->
  32. <!-- ensure webapp classloader can be released on undeploy -->
  33. <!-- ==================================================================== -->
  34. <listener>
  35. <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
  36. </listener>
  37. <!-- ==================================================================== -->
  38. <!-- Removes static cache of Methods from java.beans.Introspector to -->
  39. <!-- ensure webapp classloader can be released on undeploy -->
  40. <!-- ==================================================================== -->
  41. <listener>
  42. <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
  43. </listener>
  44. <!-- ==================================================================== -->
  45. <!-- Context params to control Session Cookies -->
  46. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  47. <!--
  48. 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>
  49. <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>
  50. <param-value>-1</param-value> </context-param>
  51. -->
  52. <!-- ==================================================================== -->
  53. <!-- The default servlet. -->
  54. <!-- This servlet, normally mapped to /, provides the handling for static -->
  55. <!-- content, OPTIONS and TRACE methods for the context. -->
  56. <!-- The following initParameters are supported: -->
  57. <!--
  58. * acceptRanges If true, range requests and responses are
  59. * supported
  60. *
  61. * dirAllowed If true, directory listings are returned if no
  62. * welcome file is found. Else 403 Forbidden.
  63. *
  64. * welcomeServlets If true, attempt to dispatch to welcome files
  65. * that are servlets, but only after no matching static
  66. * resources could be found. If false, then a welcome
  67. * file must exist on disk. If "exact", then exact
  68. * servlet matches are supported without an existing file.
  69. * Default is true.
  70. *
  71. * This must be false if you want directory listings,
  72. * but have index.jsp in your welcome file list.
  73. *
  74. * redirectWelcome If true, welcome files are redirected rather than
  75. * forwarded to.
  76. *
  77. * gzip If set to true, then static content will be served as
  78. * gzip content encoded if a matching resource is
  79. * found ending with ".gz"
  80. *
  81. * resourceBase Set to replace the context resource base
  82. *
  83. * resourceCache If set, this is a context attribute name, which the servlet
  84. * will use to look for a shared ResourceCache instance.
  85. *
  86. * relativeResourceBase
  87. * Set with a pathname relative to the base of the
  88. * servlet context root. Useful for only serving static content out
  89. * of only specific subdirectories.
  90. *
  91. * aliases If True, aliases of resources are allowed (eg. symbolic
  92. * links and caps variations). May bypass security constraints.
  93. *
  94. * maxCacheSize The maximum total size of the cache or 0 for no cache.
  95. * maxCachedFileSize The maximum size of a file to cache
  96. * maxCachedFiles The maximum number of files to cache
  97. *
  98. * useFileMappedBuffer
  99. * If set to true, it will use mapped file buffer to serve static content
  100. * when using NIO connector. Setting this value to false means that
  101. * a direct buffer will be used instead of a mapped file buffer.
  102. * By default, this is set to true.
  103. *
  104. * cacheControl If set, all static content will have this value set as the cache-control
  105. * header.
  106. -->
  107. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  108. <servlet>
  109. <servlet-name>default</servlet-name>
  110. <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
  111. <init-param>
  112. <param-name>aliases</param-name>
  113. <param-value>false</param-value>
  114. </init-param>
  115. <init-param>
  116. <param-name>acceptRanges</param-name>
  117. <param-value>true</param-value>
  118. </init-param>
  119. <init-param>
  120. <param-name>dirAllowed</param-name>
  121. <param-value>false</param-value>
  122. </init-param>
  123. <init-param>
  124. <param-name>welcomeServlets</param-name>
  125. <param-value>false</param-value>
  126. </init-param>
  127. <init-param>
  128. <param-name>redirectWelcome</param-name>
  129. <param-value>false</param-value>
  130. </init-param>
  131. <init-param>
  132. <param-name>maxCacheSize</param-name>
  133. <param-value>256000000</param-value>
  134. </init-param>
  135. <init-param>
  136. <param-name>maxCachedFileSize</param-name>
  137. <param-value>200000000</param-value>
  138. </init-param>
  139. <init-param>
  140. <param-name>maxCachedFiles</param-name>
  141. <param-value>2048</param-value>
  142. </init-param>
  143. <init-param>
  144. <param-name>gzip</param-name>
  145. <param-value>true</param-value>
  146. </init-param>
  147. <init-param>
  148. <param-name>useFileMappedBuffer</param-name>
  149. <param-value>true</param-value>
  150. </init-param>
  151. <!--
  152. <init-param>
  153. <param-name>resourceCache</param-name>
  154. <param-value>resourceCache</param-value>
  155. </init-param>
  156. -->
  157. <!--
  158. <init-param>
  159. <param-name>cacheControl</param-name>
  160. <param-value>max-age=3600,public</param-value>
  161. </init-param>
  162. -->
  163. <load-on-startup>0</load-on-startup>
  164. </servlet>
  165. <servlet-mapping>
  166. <servlet-name>default</servlet-name>
  167. <url-pattern>/</url-pattern>
  168. </servlet-mapping>
  169. <!-- ==================================================================== -->
  170. <!-- JSP Servlet -->
  171. <!-- This is the jasper JSP servlet from the jakarta project -->
  172. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  173. <!-- The JSP page compiler and execution servlet, which is the mechanism -->
  174. <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
  175. <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
  176. <!-- following initialization parameters (default values are in square -->
  177. <!-- brackets): -->
  178. <!-- -->
  179. <!-- checkInterval If development is false and reloading is true, -->
  180. <!-- background compiles are enabled. checkInterval -->
  181. <!-- is the time in seconds between checks to see -->
  182. <!-- if a JSP page needs to be recompiled. [300] -->
  183. <!-- -->
  184. <!-- compiler Which compiler Ant should use to compile JSP -->
  185. <!-- pages. See the Ant documenation for more -->
  186. <!-- information. [javac] -->
  187. <!-- -->
  188. <!-- classdebuginfo Should the class file be compiled with -->
  189. <!-- debugging information? [true] -->
  190. <!-- -->
  191. <!-- classpath What class path should I use while compiling -->
  192. <!-- generated servlets? [Created dynamically -->
  193. <!-- based on the current web application] -->
  194. <!-- Set to ? to make the container explicitly set -->
  195. <!-- this parameter. -->
  196. <!-- -->
  197. <!-- development Is Jasper used in development mode (will check -->
  198. <!-- for JSP modification on every access)? [true] -->
  199. <!-- -->
  200. <!-- enablePooling Determines whether tag handler pooling is -->
  201. <!-- enabled [true] -->
  202. <!-- -->
  203. <!-- fork Tell Ant to fork compiles of JSP pages so that -->
  204. <!-- a separate JVM is used for JSP page compiles -->
  205. <!-- from the one Tomcat is running in. [true] -->
  206. <!-- -->
  207. <!-- ieClassId The class-id value to be sent to Internet -->
  208. <!-- Explorer when using <jsp:plugin> tags. -->
  209. <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
  210. <!-- -->
  211. <!-- javaEncoding Java file encoding to use for generating java -->
  212. <!-- source files. [UTF-8] -->
  213. <!-- -->
  214. <!-- keepgenerated Should we keep the generated Java source code -->
  215. <!-- for each page instead of deleting it? [true] -->
  216. <!-- -->
  217. <!-- logVerbosityLevel The level of detailed messages to be produced -->
  218. <!-- by this servlet. Increasing levels cause the -->
  219. <!-- generation of more messages. Valid values are -->
  220. <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
  221. <!-- [WARNING] -->
  222. <!-- -->
  223. <!-- mappedfile Should we generate static content with one -->
  224. <!-- print statement per input line, to ease -->
  225. <!-- debugging? [false] -->
  226. <!-- -->
  227. <!-- -->
  228. <!-- reloading Should Jasper check for modified JSPs? [true] -->
  229. <!-- -->
  230. <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
  231. <!-- debugging be suppressed? [false] -->
  232. <!-- -->
  233. <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
  234. <!-- dumped to a file? [false] -->
  235. <!-- False if suppressSmap is true -->
  236. <!-- -->
  237. <!-- scratchdir What scratch directory should we use when -->
  238. <!-- compiling JSP pages? [default work directory -->
  239. <!-- for the current web application] -->
  240. <!-- -->
  241. <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
  242. <!-- -->
  243. <!-- xpoweredBy Determines whether X-Powered-By response -->
  244. <!-- header is added by generated servlet [false] -->
  245. <!-- -->
  246. <!-- If you wish to use Jikes to compile JSP pages: -->
  247. <!-- Set the init parameter "compiler" to "jikes". Define -->
  248. <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
  249. <!-- to cause Jikes to emit error messages in a format compatible with -->
  250. <!-- Jasper. -->
  251. <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
  252. <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
  253. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  254. <servlet
  255. id="jsp"
  256. >
  257. <servlet-name>jsp</servlet-name>
  258. <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
  259. <init-param>
  260. <param-name>logVerbosityLevel</param-name>
  261. <param-value>DEBUG</param-value>
  262. </init-param>
  263. <init-param>
  264. <param-name>fork</param-name>
  265. <param-value>false</param-value>
  266. </init-param>
  267. <init-param>
  268. <param-name>xpoweredBy</param-name>
  269. <param-value>false</param-value>
  270. </init-param>
  271. <!--
  272. <init-param>
  273. <param-name>classpath</param-name>
  274. <param-value>?</param-value>
  275. </init-param>
  276. -->
  277. <load-on-startup>0</load-on-startup>
  278. </servlet>
  279. <servlet-mapping>
  280. <servlet-name>jsp</servlet-name>
  281. <url-pattern>*.jsp</url-pattern>
  282. <url-pattern>*.jspf</url-pattern>
  283. <url-pattern>*.jspx</url-pattern>
  284. <url-pattern>*.xsp</url-pattern>
  285. <url-pattern>*.JSP</url-pattern>
  286. <url-pattern>*.JSPF</url-pattern>
  287. <url-pattern>*.JSPX</url-pattern>
  288. <url-pattern>*.XSP</url-pattern>
  289. </servlet-mapping>
  290. <!-- ==================================================================== -->
  291. <!-- Dynamic Servlet Invoker. -->
  292. <!-- This servlet invokes anonymous servlets that have not been defined -->
  293. <!-- in the web.xml or by other means. The first element of the pathInfo -->
  294. <!-- of a request passed to the envoker is treated as a servlet name for -->
  295. <!-- an existing servlet, or as a class name of a new servlet. -->
  296. <!-- This servlet is normally mapped to /servlet/* -->
  297. <!-- This servlet support the following initParams: -->
  298. <!-- -->
  299. <!-- nonContextServlets If false, the invoker can only load -->
  300. <!-- servlets from the contexts classloader. -->
  301. <!-- This is false by default and setting this -->
  302. <!-- to true may have security implications. -->
  303. <!-- -->
  304. <!-- verbose If true, log dynamic loads -->
  305. <!-- -->
  306. <!-- * All other parameters are copied to the -->
  307. <!-- each dynamic servlet as init parameters -->
  308. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  309. <!--
  310. 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>
  311. <param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
  312. <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>
  313. <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
  314. -->
  315. <!-- ==================================================================== -->
  316. <session-config>
  317. <session-timeout>30</session-timeout>
  318. </session-config>
  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
  326. <mime-mapping>
  327. <extension>mysuffix</extension>
  328. <mime-type>mymime/type</mime-type>
  329. </mime-mapping>
  330. -->
  331. <!-- ==================================================================== -->
  332. <welcome-file-list>
  333. <welcome-file>index.html</welcome-file>
  334. <welcome-file>index.htm</welcome-file>
  335. <welcome-file>index.jsp</welcome-file>
  336. </welcome-file-list>
  337. <!-- ==================================================================== -->
  338. <locale-encoding-mapping-list>
  339. <locale-encoding-mapping>
  340. <locale>ar</locale>
  341. <encoding>ISO-8859-6</encoding>
  342. </locale-encoding-mapping>
  343. <locale-encoding-mapping>
  344. <locale>be</locale>
  345. <encoding>ISO-8859-5</encoding>
  346. </locale-encoding-mapping>
  347. <locale-encoding-mapping>
  348. <locale>bg</locale>
  349. <encoding>ISO-8859-5</encoding>
  350. </locale-encoding-mapping>
  351. <locale-encoding-mapping>
  352. <locale>ca</locale>
  353. <encoding>ISO-8859-1</encoding>
  354. </locale-encoding-mapping>
  355. <locale-encoding-mapping>
  356. <locale>cs</locale>
  357. <encoding>ISO-8859-2</encoding>
  358. </locale-encoding-mapping>
  359. <locale-encoding-mapping>
  360. <locale>da</locale>
  361. <encoding>ISO-8859-1</encoding>
  362. </locale-encoding-mapping>
  363. <locale-encoding-mapping>
  364. <locale>de</locale>
  365. <encoding>ISO-8859-1</encoding>
  366. </locale-encoding-mapping>
  367. <locale-encoding-mapping>
  368. <locale>el</locale>
  369. <encoding>ISO-8859-7</encoding>
  370. </locale-encoding-mapping>
  371. <locale-encoding-mapping>
  372. <locale>en</locale>
  373. <encoding>ISO-8859-1</encoding>
  374. </locale-encoding-mapping>
  375. <locale-encoding-mapping>
  376. <locale>es</locale>
  377. <encoding>ISO-8859-1</encoding>
  378. </locale-encoding-mapping>
  379. <locale-encoding-mapping>
  380. <locale>et</locale>
  381. <encoding>ISO-8859-1</encoding>
  382. </locale-encoding-mapping>
  383. <locale-encoding-mapping>
  384. <locale>fi</locale>
  385. <encoding>ISO-8859-1</encoding>
  386. </locale-encoding-mapping>
  387. <locale-encoding-mapping>
  388. <locale>fr</locale>
  389. <encoding>ISO-8859-1</encoding>
  390. </locale-encoding-mapping>
  391. <locale-encoding-mapping>
  392. <locale>hr</locale>
  393. <encoding>ISO-8859-2</encoding>
  394. </locale-encoding-mapping>
  395. <locale-encoding-mapping>
  396. <locale>hu</locale>
  397. <encoding>ISO-8859-2</encoding>
  398. </locale-encoding-mapping>
  399. <locale-encoding-mapping>
  400. <locale>is</locale>
  401. <encoding>ISO-8859-1</encoding>
  402. </locale-encoding-mapping>
  403. <locale-encoding-mapping>
  404. <locale>it</locale>
  405. <encoding>ISO-8859-1</encoding>
  406. </locale-encoding-mapping>
  407. <locale-encoding-mapping>
  408. <locale>iw</locale>
  409. <encoding>ISO-8859-8</encoding>
  410. </locale-encoding-mapping>
  411. <locale-encoding-mapping>
  412. <locale>ja</locale>
  413. <encoding>Shift_JIS</encoding>
  414. </locale-encoding-mapping>
  415. <locale-encoding-mapping>
  416. <locale>ko</locale>
  417. <encoding>EUC-KR</encoding>
  418. </locale-encoding-mapping>
  419. <locale-encoding-mapping>
  420. <locale>lt</locale>
  421. <encoding>ISO-8859-2</encoding>
  422. </locale-encoding-mapping>
  423. <locale-encoding-mapping>
  424. <locale>lv</locale>
  425. <encoding>ISO-8859-2</encoding>
  426. </locale-encoding-mapping>
  427. <locale-encoding-mapping>
  428. <locale>mk</locale>
  429. <encoding>ISO-8859-5</encoding>
  430. </locale-encoding-mapping>
  431. <locale-encoding-mapping>
  432. <locale>nl</locale>
  433. <encoding>ISO-8859-1</encoding>
  434. </locale-encoding-mapping>
  435. <locale-encoding-mapping>
  436. <locale>no</locale>
  437. <encoding>ISO-8859-1</encoding>
  438. </locale-encoding-mapping>
  439. <locale-encoding-mapping>
  440. <locale>pl</locale>
  441. <encoding>ISO-8859-2</encoding>
  442. </locale-encoding-mapping>
  443. <locale-encoding-mapping>
  444. <locale>pt</locale>
  445. <encoding>ISO-8859-1</encoding>
  446. </locale-encoding-mapping>
  447. <locale-encoding-mapping>
  448. <locale>ro</locale>
  449. <encoding>ISO-8859-2</encoding>
  450. </locale-encoding-mapping>
  451. <locale-encoding-mapping>
  452. <locale>ru</locale>
  453. <encoding>ISO-8859-5</encoding>
  454. </locale-encoding-mapping>
  455. <locale-encoding-mapping>
  456. <locale>sh</locale>
  457. <encoding>ISO-8859-5</encoding>
  458. </locale-encoding-mapping>
  459. <locale-encoding-mapping>
  460. <locale>sk</locale>
  461. <encoding>ISO-8859-2</encoding>
  462. </locale-encoding-mapping>
  463. <locale-encoding-mapping>
  464. <locale>sl</locale>
  465. <encoding>ISO-8859-2</encoding>
  466. </locale-encoding-mapping>
  467. <locale-encoding-mapping>
  468. <locale>sq</locale>
  469. <encoding>ISO-8859-2</encoding>
  470. </locale-encoding-mapping>
  471. <locale-encoding-mapping>
  472. <locale>sr</locale>
  473. <encoding>ISO-8859-5</encoding>
  474. </locale-encoding-mapping>
  475. <locale-encoding-mapping>
  476. <locale>sv</locale>
  477. <encoding>ISO-8859-1</encoding>
  478. </locale-encoding-mapping>
  479. <locale-encoding-mapping>
  480. <locale>tr</locale>
  481. <encoding>ISO-8859-9</encoding>
  482. </locale-encoding-mapping>
  483. <locale-encoding-mapping>
  484. <locale>uk</locale>
  485. <encoding>ISO-8859-5</encoding>
  486. </locale-encoding-mapping>
  487. <locale-encoding-mapping>
  488. <locale>zh</locale>
  489. <encoding>GB2312</encoding>
  490. </locale-encoding-mapping>
  491. <locale-encoding-mapping>
  492. <locale>zh_TW</locale>
  493. <encoding>Big5</encoding>
  494. </locale-encoding-mapping>
  495. </locale-encoding-mapping-list>
  496. <security-constraint>
  497. <web-resource-collection>
  498. <web-resource-name>Disable TRACE</web-resource-name>
  499. <url-pattern>/</url-pattern>
  500. <http-method>TRACE</http-method>
  501. </web-resource-collection>
  502. <auth-constraint/>
  503. </security-constraint>
  504. </web-app>