webdefault.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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. <description>
  26. Default web.xml file.
  27. This file is applied to a Web application before it's own WEB_INF/web.xml file
  28. </description>
  29. <!-- ==================================================================== -->
  30. <!-- Context params to control Session Cookies -->
  31. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  32. <!-- UNCOMMENT TO ACTIVATE
  33. <context-param>
  34. <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
  35. <param-value>127.0.0.1</param-value>
  36. </context-param>
  37. <context-param>
  38. <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
  39. <param-value>/</param-value>
  40. </context-param>
  41. <context-param>
  42. <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
  43. <param-value>-1</param-value>
  44. </context-param>
  45. -->
  46. <context-param>
  47. <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
  48. <param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value>
  49. </context-param>
  50. <!-- ==================================================================== -->
  51. <!-- The default servlet. -->
  52. <!-- This servlet, normally mapped to /, provides the handling for static -->
  53. <!-- content, OPTIONS and TRACE methods for the context. -->
  54. <!-- The following initParameters are supported: -->
  55. <!-- -->
  56. <!-- acceptRanges If true, range requests and responses are -->
  57. <!-- supported -->
  58. <!-- -->
  59. <!-- dirAllowed If true, directory listings are returned if no -->
  60. <!-- welcome file is found. Else 403 Forbidden. -->
  61. <!-- -->
  62. <!-- redirectWelcome If true, redirect welcome file requests -->
  63. <!-- else use request dispatcher forwards -->
  64. <!-- -->
  65. <!-- gzip If set to true, then static content will be served-->
  66. <!-- as gzip content encoded if a matching resource is -->
  67. <!-- found ending with ".gz" -->
  68. <!-- -->
  69. <!-- resoureBase Can be set to replace the context resource base -->
  70. <!-- -->
  71. <!-- relativeResourceBase -->
  72. <!-- Set with a pathname relative to the base of the -->
  73. <!-- servlet context root. Useful for only serving -->
  74. <!-- static content from only specific subdirectories. -->
  75. <!-- -->
  76. <!-- useFileMappedBuffer -->
  77. <!-- If set to true (the default), a memory mapped -->
  78. <!-- file buffer will be used to serve static content -->
  79. <!-- when using an NIO connector. Setting this value -->
  80. <!-- to false means that a direct buffer will be used -->
  81. <!-- instead. If you are having trouble with Windows -->
  82. <!-- file locking, set this to false. -->
  83. <!-- -->
  84. <!-- cacheControl If set, all static content will have this value -->
  85. <!-- set as the cache-control header. -->
  86. <!-- -->
  87. <!-- maxCacheSize Maximum size of the static resource cache -->
  88. <!-- -->
  89. <!-- maxCachedFileSize Maximum size of any single file in the cache -->
  90. <!-- -->
  91. <!-- maxCachedFiles Maximum number of files in the cache -->
  92. <!-- -->
  93. <!-- cacheType "nio", "bio" or "both" to determine the type(s) -->
  94. <!-- of resource cache. A bio cached buffer may be used-->
  95. <!-- by nio but is not as efficient as a nio buffer. -->
  96. <!-- An nio cached buffer may not be used by bio. -->
  97. <!-- -->
  98. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  99. <servlet>
  100. <servlet-name>default</servlet-name>
  101. <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
  102. <init-param>
  103. <param-name>acceptRanges</param-name>
  104. <param-value>true</param-value>
  105. </init-param>
  106. <init-param>
  107. <param-name>dirAllowed</param-name>
  108. <param-value>true</param-value>
  109. </init-param>
  110. <init-param>
  111. <param-name>redirectWelcome</param-name>
  112. <param-value>false</param-value>
  113. </init-param>
  114. <init-param>
  115. <param-name>maxCacheSize</param-name>
  116. <param-value>4000000</param-value>
  117. </init-param>
  118. <init-param>
  119. <param-name>maxCachedFileSize</param-name>
  120. <param-value>254000</param-value>
  121. </init-param>
  122. <init-param>
  123. <param-name>maxCachedFiles</param-name>
  124. <param-value>1000</param-value>
  125. </init-param>
  126. <init-param>
  127. <param-name>cacheType</param-name>
  128. <param-value>both</param-value>
  129. </init-param>
  130. <init-param>
  131. <param-name>gzip</param-name>
  132. <param-value>true</param-value>
  133. </init-param>
  134. <init-param>
  135. <param-name>useFileMappedBuffer</param-name>
  136. <!--
  137. <param-value>true</param-value>
  138. -->
  139. <param-value>false</param-value>
  140. </init-param>
  141. <!--
  142. <init-param>
  143. <param-name>cacheControl</param-name>
  144. <param-value>max-age=3600,public</param-value>
  145. </init-param>
  146. -->
  147. <load-on-startup>0</load-on-startup>
  148. </servlet>
  149. <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
  150. <!-- ==================================================================== -->
  151. <!-- JSP Servlet -->
  152. <!-- This is the jasper JSP servlet from the jakarta project -->
  153. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  154. <!-- The JSP page compiler and execution servlet, which is the mechanism -->
  155. <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
  156. <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
  157. <!-- following initialization parameters (default values are in square -->
  158. <!-- brackets): -->
  159. <!-- -->
  160. <!-- checkInterval If development is false and reloading is true, -->
  161. <!-- background compiles are enabled. checkInterval -->
  162. <!-- is the time in seconds between checks to see -->
  163. <!-- if a JSP page needs to be recompiled. [300] -->
  164. <!-- -->
  165. <!-- compiler Which compiler Ant should use to compile JSP -->
  166. <!-- pages. See the Ant documenation for more -->
  167. <!-- information. [javac] -->
  168. <!-- -->
  169. <!-- classdebuginfo Should the class file be compiled with -->
  170. <!-- debugging information? [true] -->
  171. <!-- -->
  172. <!-- classpath What class path should I use while compiling -->
  173. <!-- generated servlets? [Created dynamically -->
  174. <!-- based on the current web application] -->
  175. <!-- Set to ? to make the container explicitly set -->
  176. <!-- this parameter. -->
  177. <!-- -->
  178. <!-- development Is Jasper used in development mode (will check -->
  179. <!-- for JSP modification on every access)? [true] -->
  180. <!-- -->
  181. <!-- enablePooling Determines whether tag handler pooling is -->
  182. <!-- enabled [true] -->
  183. <!-- -->
  184. <!-- fork Tell Ant to fork compiles of JSP pages so that -->
  185. <!-- a separate JVM is used for JSP page compiles -->
  186. <!-- from the one Tomcat is running in. [true] -->
  187. <!-- -->
  188. <!-- ieClassId The class-id value to be sent to Internet -->
  189. <!-- Explorer when using <jsp:plugin> tags. -->
  190. <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
  191. <!-- -->
  192. <!-- javaEncoding Java file encoding to use for generating java -->
  193. <!-- source files. [UTF-8] -->
  194. <!-- -->
  195. <!-- keepgenerated Should we keep the generated Java source code -->
  196. <!-- for each page instead of deleting it? [true] -->
  197. <!-- -->
  198. <!-- logVerbosityLevel The level of detailed messages to be produced -->
  199. <!-- by this servlet. Increasing levels cause the -->
  200. <!-- generation of more messages. Valid values are -->
  201. <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
  202. <!-- [WARNING] -->
  203. <!-- -->
  204. <!-- mappedfile Should we generate static content with one -->
  205. <!-- print statement per input line, to ease -->
  206. <!-- debugging? [false] -->
  207. <!-- -->
  208. <!-- -->
  209. <!-- reloading Should Jasper check for modified JSPs? [true] -->
  210. <!-- -->
  211. <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
  212. <!-- debugging be suppressed? [false] -->
  213. <!-- -->
  214. <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
  215. <!-- dumped to a file? [false] -->
  216. <!-- False if suppressSmap is true -->
  217. <!-- -->
  218. <!-- scratchdir What scratch directory should we use when -->
  219. <!-- compiling JSP pages? [default work directory -->
  220. <!-- for the current web application] -->
  221. <!-- -->
  222. <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
  223. <!-- -->
  224. <!-- xpoweredBy Determines whether X-Powered-By response -->
  225. <!-- header is added by generated servlet [false] -->
  226. <!-- -->
  227. <!-- If you wish to use Jikes to compile JSP pages: -->
  228. <!-- Set the init parameter "compiler" to "jikes". Define -->
  229. <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
  230. <!-- to cause Jikes to emit error messages in a format compatible with -->
  231. <!-- Jasper. -->
  232. <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
  233. <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
  234. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  235. <servlet id="jsp">
  236. <servlet-name>jsp</servlet-name>
  237. <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
  238. <init-param>
  239. <param-name>logVerbosityLevel</param-name>
  240. <param-value>DEBUG</param-value>
  241. </init-param>
  242. <init-param>
  243. <param-name>fork</param-name>
  244. <param-value>false</param-value>
  245. </init-param>
  246. <init-param>
  247. <param-name>xpoweredBy</param-name>
  248. <param-value>false</param-value>
  249. </init-param>
  250. <!--
  251. <init-param>
  252. <param-name>classpath</param-name>
  253. <param-value>?</param-value>
  254. </init-param>
  255. -->
  256. <load-on-startup>0</load-on-startup>
  257. </servlet>
  258. <servlet-mapping>
  259. <servlet-name>jsp</servlet-name>
  260. <url-pattern>*.jsp</url-pattern>
  261. <url-pattern>*.jspf</url-pattern>
  262. <url-pattern>*.jspx</url-pattern>
  263. <url-pattern>*.xsp</url-pattern>
  264. <url-pattern>*.JSP</url-pattern>
  265. <url-pattern>*.JSPF</url-pattern>
  266. <url-pattern>*.JSPX</url-pattern>
  267. <url-pattern>*.XSP</url-pattern>
  268. </servlet-mapping>
  269. <!-- ==================================================================== -->
  270. <!-- Dynamic Servlet Invoker. -->
  271. <!-- This servlet invokes anonymous servlets that have not been defined -->
  272. <!-- in the web.xml or by other means. The first element of the pathInfo -->
  273. <!-- of a request passed to the envoker is treated as a servlet name for -->
  274. <!-- an existing servlet, or as a class name of a new servlet. -->
  275. <!-- This servlet is normally mapped to /servlet/* -->
  276. <!-- This servlet support the following initParams: -->
  277. <!-- -->
  278. <!-- nonContextServlets If false, the invoker can only load -->
  279. <!-- servlets from the contexts classloader. -->
  280. <!-- This is false by default and setting this -->
  281. <!-- to true may have security implications. -->
  282. <!-- -->
  283. <!-- verbose If true, log dynamic loads -->
  284. <!-- -->
  285. <!-- * All other parameters are copied to the -->
  286. <!-- each dynamic servlet as init parameters -->
  287. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  288. <!-- Uncomment for dynamic invocation
  289. <servlet>
  290. <servlet-name>invoker</servlet-name>
  291. <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
  292. <init-param>
  293. <param-name>verbose</param-name>
  294. <param-value>false</param-value>
  295. </init-param>
  296. <init-param>
  297. <param-name>nonContextServlets</param-name>
  298. <param-value>false</param-value>
  299. </init-param>
  300. <init-param>
  301. <param-name>dynamicParam</param-name>
  302. <param-value>anyValue</param-value>
  303. </init-param>
  304. <load-on-startup>0</load-on-startup>
  305. </servlet>
  306. <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
  307. -->
  308. <!-- ==================================================================== -->
  309. <session-config>
  310. <session-timeout>30</session-timeout>
  311. </session-config>
  312. <!-- ==================================================================== -->
  313. <!-- Default MIME mappings -->
  314. <!-- The default MIME mappings are provided by the mime.properties -->
  315. <!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
  316. <!-- mappings may be specified here -->
  317. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  318. <!-- UNCOMMENT TO ACTIVATE
  319. <mime-mapping>
  320. <extension>mysuffix</extension>
  321. <mime-type>mymime/type</mime-type>
  322. </mime-mapping>
  323. -->
  324. <!-- ==================================================================== -->
  325. <welcome-file-list>
  326. <welcome-file>index.html</welcome-file>
  327. <welcome-file>index.htm</welcome-file>
  328. <welcome-file>index.jsp</welcome-file>
  329. </welcome-file-list>
  330. <!-- ==================================================================== -->
  331. <locale-encoding-mapping-list>
  332. <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
  333. <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  334. <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  335. <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  336. <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  337. <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  338. <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  339. <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
  340. <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  341. <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  342. <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  343. <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  344. <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  345. <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  346. <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  347. <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  348. <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  349. <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
  350. <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
  351. <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
  352. <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  353. <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  354. <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  355. <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  356. <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  357. <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  358. <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  359. <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  360. <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  361. <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  362. <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  363. <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  364. <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
  365. <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  366. <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
  367. <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
  368. <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
  369. <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
  370. <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
  371. </locale-encoding-mapping-list>
  372. <security-constraint>
  373. <web-resource-collection>
  374. <web-resource-name>Disable TRACE</web-resource-name>
  375. <url-pattern>/</url-pattern>
  376. <http-method>TRACE</http-method>
  377. </web-resource-collection>
  378. <auth-constraint/>
  379. </security-constraint>
  380. </web-app>