web.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2002-2006 Matt Magoffin
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2 of
  7. the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA
  16. $Id: web.xml,v 1.4 2006/11/28 09:23:25 matt Exp $
  17. -->
  18. <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  19. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  20. xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  21. version="2.4">
  22. <resource-ref>
  23. <res-ref-name>jdbc/ieat</res-ref-name>
  24. <res-type>javax.sql.DataSource</res-type>
  25. <res-auth>Container</res-auth>
  26. <res-sharing-scope>Shareable</res-sharing-scope>
  27. </resource-ref>
  28. <resource-ref>
  29. <res-ref-name>mail/ieat</res-ref-name>
  30. <res-type>javax.mail.Session</res-type>
  31. <res-auth>Container</res-auth>
  32. <res-sharing-scope>Shareable</res-sharing-scope>
  33. </resource-ref>
  34. <context-param>
  35. <param-name>webAppRootKey</param-name>
  36. <param-value>ieat.root.dir</param-value>
  37. </context-param>
  38. <!--
  39. <context-param>
  40. <param-name>log4jConfigLocation</param-name>
  41. <param-value>log4j.properties</param-value>
  42. </context-param>
  43. -->
  44. <context-param>
  45. <param-name>contextConfigLocation</param-name>
  46. <param-value>
  47. /WEB-INF/dataAccessContext.xml
  48. /WEB-INF/applicationContext.xml
  49. </param-value>
  50. </context-param>
  51. <!--
  52. Static content client-side cache headers filter
  53. -->
  54. <filter>
  55. <filter-name>Client-side Cache Headers Filter</filter-name>
  56. <filter-class>magoffin.matt.xweb.util.ResponseHeaderFilter</filter-class>
  57. <init-param>
  58. <param-name>Cache-Control</param-name>
  59. <param-value>max-age=86400</param-value>
  60. </init-param>
  61. </filter>
  62. <!-- Compression filter -->
  63. <filter>
  64. <filter-name>Compression Filter</filter-name>
  65. <filter-class>compressionFilters.CompressionFilter</filter-class>
  66. <init-param>
  67. <param-name>compressionThreshold</param-name>
  68. <param-value>10</param-value>
  69. </init-param>
  70. <init-param>
  71. <param-name>debug</param-name>
  72. <param-value>0</param-value>
  73. </init-param>
  74. </filter>
  75. <!-- Use UTF-8 character encoding -->
  76. <filter>
  77. <filter-name>Set Character Encoding</filter-name>
  78. <filter-class>filters.SetCharacterEncodingFilter</filter-class>
  79. <init-param>
  80. <param-name>encoding</param-name>
  81. <param-value>UTF-8</param-value>
  82. </init-param>
  83. </filter>
  84. <!-- Cache filter -->
  85. <filter-mapping>
  86. <filter-name>Client-side Cache Headers Filter</filter-name>
  87. <url-pattern>*.js</url-pattern>
  88. </filter-mapping>
  89. <filter-mapping>
  90. <filter-name>Client-side Cache Headers Filter</filter-name>
  91. <url-pattern>*.css</url-pattern>
  92. </filter-mapping>
  93. <filter-mapping>
  94. <filter-name>Client-side Cache Headers Filter</filter-name>
  95. <url-pattern>*.gif</url-pattern>
  96. </filter-mapping>
  97. <filter-mapping>
  98. <filter-name>Client-side Cache Headers Filter</filter-name>
  99. <url-pattern>*.jpg</url-pattern>
  100. </filter-mapping>
  101. <filter-mapping>
  102. <filter-name>Client-side Cache Headers Filter</filter-name>
  103. <url-pattern>*.png</url-pattern>
  104. </filter-mapping>
  105. <filter-mapping>
  106. <filter-name>Client-side Cache Headers Filter</filter-name>
  107. <url-pattern>*.html</url-pattern>
  108. </filter-mapping>
  109. <filter-mapping>
  110. <filter-name>Client-side Cache Headers Filter</filter-name>
  111. <url-pattern>/messages.json</url-pattern>
  112. </filter-mapping>
  113. <!-- Compression filter -->
  114. <filter-mapping>
  115. <filter-name>Compression Filter</filter-name>
  116. <url-pattern>*.css</url-pattern>
  117. </filter-mapping>
  118. <filter-mapping>
  119. <filter-name>Compression Filter</filter-name>
  120. <url-pattern>*.do</url-pattern>
  121. </filter-mapping>
  122. <filter-mapping>
  123. <filter-name>Compression Filter</filter-name>
  124. <url-pattern>*.html</url-pattern>
  125. </filter-mapping>
  126. <filter-mapping>
  127. <filter-name>Compression Filter</filter-name>
  128. <url-pattern>*.js</url-pattern>
  129. </filter-mapping>
  130. <filter-mapping>
  131. <filter-name>Compression Filter</filter-name>
  132. <url-pattern>*.json</url-pattern>
  133. </filter-mapping>
  134. <filter-mapping>
  135. <filter-name>Compression Filter</filter-name>
  136. <url-pattern>*.txt</url-pattern>
  137. </filter-mapping>
  138. <filter-mapping>
  139. <filter-name>Set Character Encoding</filter-name>
  140. <servlet-name>ieat</servlet-name>
  141. </filter-mapping>
  142. <!--
  143. <listener>
  144. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  145. </listener>
  146. -->
  147. <listener>
  148. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  149. </listener>
  150. <servlet>
  151. <servlet-name>ieat</servlet-name>
  152. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  153. <load-on-startup>1</load-on-startup>
  154. </servlet>
  155. <servlet-mapping>
  156. <servlet-name>ieat</servlet-name>
  157. <url-pattern>*.do</url-pattern>
  158. </servlet-mapping>
  159. <servlet-mapping>
  160. <servlet-name>ieat</servlet-name>
  161. <url-pattern>*.json</url-pattern>
  162. </servlet-mapping>
  163. <welcome-file-list>
  164. <welcome-file>index.jsp</welcome-file>
  165. </welcome-file-list>
  166. </web-app>