XML   41

webdefault xml

Guest on 25th May 2022 01:05:47 PM

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

Raw Paste


Login or Register to edit or fork this paste. It's free.