webdefault_a.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  4. metadata-complete="false" version="3.1">
  5. <!-- ===================================================================== -->
  6. <!-- This file contains the default descriptor for web applications. -->
  7. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  8. - -->
  9. <!-- The intent of this descriptor is to include jetty specific or common -->
  10. <!-- configuration for all webapps. If a context has a webdefault.xml -->
  11. <!-- descriptor, it is applied before the context's own web.xml file -->
  12. <!-- -->
  13. <!-- A context may be assigned a default descriptor by calling -->
  14. <!-- WebAppContext.setDefaultsDescriptor(String). -->
  15. <!-- -->
  16. <!-- This file is present in the jetty-webapp.jar, and is used as the -->
  17. <!-- defaults descriptor if no other is explicitly set on a context. -->
  18. <!-- -->
  19. <!-- A copy of this file is also placed into the $JETTY_HOME/etc dir of -->
  20. <!-- the distribution, and is referenced by some of the other xml files, -->
  21. <!-- eg the jetty-deploy.xml file. -->
  22. <!-- ===================================================================== -->
  23. <description>www.o2oa.io</description>
  24. <!-- ==================================================================== -->
  25. <!-- Removes static references to beans from javax.el.BeanELResolver to -->
  26. <!-- ensure webapp classloader can be released on undeploy -->
  27. <!-- ==================================================================== -->
  28. <!--listener>
  29. <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
  30. </listener-->
  31. <!-- ==================================================================== -->
  32. <!-- Removes static cache of Methods from java.beans.Introspector to -->
  33. <!-- ensure webapp classloader can be released on undeploy -->
  34. <!-- ==================================================================== -->
  35. <!--listener>
  36. <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
  37. </listener-->
  38. <!-- ==================================================================== -->
  39. <!-- Context params to control Session Cookies -->
  40. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  41. <!-- UNCOMMENT TO ACTIVATE <context-param> <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name>
  42. <param-value>127.0.0.1</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.SessionPath</param-name>
  43. <param-value>/</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.MaxAge</param-name>
  44. <param-value>-1</param-value> </context-param> -->
  45. <!-- ==================================================================== -->
  46. <!-- The default servlet. -->
  47. <!-- This servlet, normally mapped to /, provides the handling for static -->
  48. <!-- content, OPTIONS and TRACE methods for the context. -->
  49. <!-- The following initParameters are supported: -->
  50. <!-- * acceptRanges If true, range requests and responses are * supported
  51. * * dirAllowed If true, directory listings are returned if no * welcome file
  52. is found. Else 403 Forbidden. * * welcomeServlets If true, attempt to dispatch
  53. to welcome files * that are servlets, but only after no matching static *
  54. resources could be found. If false, then a welcome * file must exist on disk.
  55. If "exact", then exact * servlet matches are supported without an existing
  56. file. * Default is true. * * This must be false if you want directory listings,
  57. * but have index.jsp in your welcome file list. * * redirectWelcome If true,
  58. welcome files are redirected rather than * forwarded to. * * gzip If set
  59. to true, then static content will be served as * gzip content encoded if
  60. a matching resource is * found ending with ".gz" * * resourceBase Set to
  61. replace the context resource base * * resourceCache If set, this is a context
  62. attribute name, which the servlet * will use to look for a shared ResourceCache
  63. instance. * * relativeResourceBase * Set with a pathname relative to the
  64. base of the * servlet context root. Useful for only serving static content
  65. out * of only specific subdirectories. * * pathInfoOnly If true, only the
  66. path info will be applied to the resourceBase * * stylesheet Set with the
  67. location of an optional stylesheet that will be used * to decorate the directory
  68. listing html. * * aliases If True, aliases of resources are allowed (eg.
  69. symbolic * links and caps variations). May bypass security constraints. *
  70. * etags If True, weak etags will be generated and handled. * * maxCacheSize
  71. The maximum total size of the cache or 0 for no cache. * maxCachedFileSize
  72. The maximum size of a file to cache * maxCachedFiles The maximum number of
  73. files to cache * * useFileMappedBuffer * If set to true, it will use mapped
  74. file buffers to serve static content * when using an NIO connector. Setting
  75. this value to false means that * a direct buffer will be used instead of
  76. a mapped file buffer. * This file sets the value to true. * * cacheControl
  77. If set, all static content will have this value set as the cache-control
  78. * header. * -->
  79. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  80. <servlet>
  81. <servlet-name>default</servlet-name>
  82. <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
  83. <init-param>
  84. <param-name>aliases</param-name>
  85. <param-value>false</param-value>
  86. </init-param>
  87. <init-param>
  88. <param-name>acceptRanges</param-name>
  89. <param-value>true</param-value>
  90. </init-param>
  91. <init-param>
  92. <param-name>dirAllowed</param-name>
  93. <param-value>false</param-value>
  94. </init-param>
  95. <init-param>
  96. <param-name>welcomeServlets</param-name>
  97. <param-value>false</param-value>
  98. </init-param>
  99. <init-param>
  100. <param-name>redirectWelcome</param-name>
  101. <param-value>false</param-value>
  102. </init-param>
  103. <init-param>
  104. <param-name>maxCacheSize</param-name>
  105. <param-value>256000000</param-value>
  106. </init-param>
  107. <init-param>
  108. <param-name>maxCachedFileSize</param-name>
  109. <param-value>200000000</param-value>
  110. </init-param>
  111. <init-param>
  112. <param-name>maxCachedFiles</param-name>
  113. <param-value>2048</param-value>
  114. </init-param>
  115. <init-param>
  116. <param-name>gzip</param-name>
  117. <param-value>false</param-value>
  118. </init-param>
  119. <init-param>
  120. <param-name>etags</param-name>
  121. <param-value>false</param-value>
  122. </init-param>
  123. <load-on-startup>0</load-on-startup>
  124. </servlet>
  125. <servlet-mapping>
  126. <servlet-name>default</servlet-name>
  127. <url-pattern>/</url-pattern>
  128. </servlet-mapping>
  129. <session-config>
  130. <session-timeout>30</session-timeout>
  131. </session-config>
  132. <!-- ==================================================================== -->
  133. <!-- Default MIME mappings -->
  134. <!-- The default MIME mappings are provided by the mime.properties -->
  135. <!-- resource in the jetty-http.jar file. Additional or modified -->
  136. <!-- mappings may be specified here -->
  137. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  138. <!-- UNCOMMENT TO ACTIVATE <mime-mapping> <extension>mysuffix</extension>
  139. <mime-type>mymime/type</mime-type> </mime-mapping> -->
  140. <mime-mapping>
  141. <extension>wcss</extension>
  142. <mime-type>application/json</mime-type>
  143. </mime-mapping>
  144. <!-- ==================================================================== -->
  145. <!-- Default welcome files -->
  146. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  147. <welcome-file-list>
  148. <welcome-file>index.html</welcome-file>
  149. </welcome-file-list>
  150. <!-- ==================================================================== -->
  151. <!-- Default locale encodings -->
  152. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  153. <locale-encoding-mapping-list>
  154. <locale-encoding-mapping>
  155. <locale>ar</locale>
  156. <encoding>ISO-8859-6</encoding>
  157. </locale-encoding-mapping>
  158. <locale-encoding-mapping>
  159. <locale>be</locale>
  160. <encoding>ISO-8859-5</encoding>
  161. </locale-encoding-mapping>
  162. <locale-encoding-mapping>
  163. <locale>bg</locale>
  164. <encoding>ISO-8859-5</encoding>
  165. </locale-encoding-mapping>
  166. <locale-encoding-mapping>
  167. <locale>ca</locale>
  168. <encoding>ISO-8859-1</encoding>
  169. </locale-encoding-mapping>
  170. <locale-encoding-mapping>
  171. <locale>cs</locale>
  172. <encoding>ISO-8859-2</encoding>
  173. </locale-encoding-mapping>
  174. <locale-encoding-mapping>
  175. <locale>da</locale>
  176. <encoding>ISO-8859-1</encoding>
  177. </locale-encoding-mapping>
  178. <locale-encoding-mapping>
  179. <locale>de</locale>
  180. <encoding>ISO-8859-1</encoding>
  181. </locale-encoding-mapping>
  182. <locale-encoding-mapping>
  183. <locale>el</locale>
  184. <encoding>ISO-8859-7</encoding>
  185. </locale-encoding-mapping>
  186. <locale-encoding-mapping>
  187. <locale>en</locale>
  188. <encoding>ISO-8859-1</encoding>
  189. </locale-encoding-mapping>
  190. <locale-encoding-mapping>
  191. <locale>es</locale>
  192. <encoding>ISO-8859-1</encoding>
  193. </locale-encoding-mapping>
  194. <locale-encoding-mapping>
  195. <locale>et</locale>
  196. <encoding>ISO-8859-1</encoding>
  197. </locale-encoding-mapping>
  198. <locale-encoding-mapping>
  199. <locale>fi</locale>
  200. <encoding>ISO-8859-1</encoding>
  201. </locale-encoding-mapping>
  202. <locale-encoding-mapping>
  203. <locale>fr</locale>
  204. <encoding>ISO-8859-1</encoding>
  205. </locale-encoding-mapping>
  206. <locale-encoding-mapping>
  207. <locale>hr</locale>
  208. <encoding>ISO-8859-2</encoding>
  209. </locale-encoding-mapping>
  210. <locale-encoding-mapping>
  211. <locale>hu</locale>
  212. <encoding>ISO-8859-2</encoding>
  213. </locale-encoding-mapping>
  214. <locale-encoding-mapping>
  215. <locale>is</locale>
  216. <encoding>ISO-8859-1</encoding>
  217. </locale-encoding-mapping>
  218. <locale-encoding-mapping>
  219. <locale>it</locale>
  220. <encoding>ISO-8859-1</encoding>
  221. </locale-encoding-mapping>
  222. <locale-encoding-mapping>
  223. <locale>iw</locale>
  224. <encoding>ISO-8859-8</encoding>
  225. </locale-encoding-mapping>
  226. <locale-encoding-mapping>
  227. <locale>ja</locale>
  228. <encoding>Shift_JIS</encoding>
  229. </locale-encoding-mapping>
  230. <locale-encoding-mapping>
  231. <locale>ko</locale>
  232. <encoding>EUC-KR</encoding>
  233. </locale-encoding-mapping>
  234. <locale-encoding-mapping>
  235. <locale>lt</locale>
  236. <encoding>ISO-8859-2</encoding>
  237. </locale-encoding-mapping>
  238. <locale-encoding-mapping>
  239. <locale>lv</locale>
  240. <encoding>ISO-8859-2</encoding>
  241. </locale-encoding-mapping>
  242. <locale-encoding-mapping>
  243. <locale>mk</locale>
  244. <encoding>ISO-8859-5</encoding>
  245. </locale-encoding-mapping>
  246. <locale-encoding-mapping>
  247. <locale>nl</locale>
  248. <encoding>ISO-8859-1</encoding>
  249. </locale-encoding-mapping>
  250. <locale-encoding-mapping>
  251. <locale>no</locale>
  252. <encoding>ISO-8859-1</encoding>
  253. </locale-encoding-mapping>
  254. <locale-encoding-mapping>
  255. <locale>pl</locale>
  256. <encoding>ISO-8859-2</encoding>
  257. </locale-encoding-mapping>
  258. <locale-encoding-mapping>
  259. <locale>pt</locale>
  260. <encoding>ISO-8859-1</encoding>
  261. </locale-encoding-mapping>
  262. <locale-encoding-mapping>
  263. <locale>ro</locale>
  264. <encoding>ISO-8859-2</encoding>
  265. </locale-encoding-mapping>
  266. <locale-encoding-mapping>
  267. <locale>ru</locale>
  268. <encoding>ISO-8859-5</encoding>
  269. </locale-encoding-mapping>
  270. <locale-encoding-mapping>
  271. <locale>sh</locale>
  272. <encoding>ISO-8859-5</encoding>
  273. </locale-encoding-mapping>
  274. <locale-encoding-mapping>
  275. <locale>sk</locale>
  276. <encoding>ISO-8859-2</encoding>
  277. </locale-encoding-mapping>
  278. <locale-encoding-mapping>
  279. <locale>sl</locale>
  280. <encoding>ISO-8859-2</encoding>
  281. </locale-encoding-mapping>
  282. <locale-encoding-mapping>
  283. <locale>sq</locale>
  284. <encoding>ISO-8859-2</encoding>
  285. </locale-encoding-mapping>
  286. <locale-encoding-mapping>
  287. <locale>sr</locale>
  288. <encoding>ISO-8859-5</encoding>
  289. </locale-encoding-mapping>
  290. <locale-encoding-mapping>
  291. <locale>sv</locale>
  292. <encoding>ISO-8859-1</encoding>
  293. </locale-encoding-mapping>
  294. <locale-encoding-mapping>
  295. <locale>tr</locale>
  296. <encoding>ISO-8859-9</encoding>
  297. </locale-encoding-mapping>
  298. <locale-encoding-mapping>
  299. <locale>uk</locale>
  300. <encoding>ISO-8859-5</encoding>
  301. </locale-encoding-mapping>
  302. <locale-encoding-mapping>
  303. <locale>zh</locale>
  304. <encoding>GB2312</encoding>
  305. </locale-encoding-mapping>
  306. <locale-encoding-mapping>
  307. <locale>zh_TW</locale>
  308. <encoding>Big5</encoding>
  309. </locale-encoding-mapping>
  310. </locale-encoding-mapping-list>
  311. <!-- ==================================================================== -->
  312. <!-- Disable TRACE method with security constraint -->
  313. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  314. <security-constraint>
  315. <web-resource-collection>
  316. <web-resource-name>Disable TRACE</web-resource-name>
  317. <url-pattern>/</url-pattern>
  318. <http-method>TRACE</http-method>
  319. </web-resource-collection>
  320. <auth-constraint />
  321. </security-constraint>
  322. <security-constraint>
  323. <web-resource-collection>
  324. <web-resource-name>Enable everything but TRACE</web-resource-name>
  325. <url-pattern>/</url-pattern>
  326. <http-method-omission>TRACE</http-method-omission>
  327. </web-resource-collection>
  328. </security-constraint>
  329. <servlet>
  330. <servlet-name>DruidStatView</servlet-name>
  331. <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
  332. </servlet>
  333. <servlet-mapping>
  334. <servlet-name>DruidStatView</servlet-name>
  335. <url-pattern>/druid/*</url-pattern>
  336. </servlet-mapping>
  337. <filter>
  338. <filter-name>DruidFilter</filter-name>
  339. <filter-class>com.x.base.core.project.jaxrs.DruidFilter</filter-class>
  340. </filter>
  341. <filter-mapping>
  342. <filter-name>DruidFilter</filter-name>
  343. <url-pattern>/druid/*</url-pattern>
  344. </filter-mapping>
  345. </web-app>