web.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  4. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  5. id="WebApp_ID" version="3.0">
  6. <welcome-file-list>
  7. <welcome-file>index.html</welcome-file>
  8. </welcome-file-list>
  9. <session-config>
  10. <session-timeout>30</session-timeout>
  11. </session-config>
  12. <display-name>zoumasuyuan</display-name>
  13. <welcome-file-list>
  14. <welcome-file>index.html</welcome-file>
  15. </welcome-file-list>
  16. <context-param>
  17. <param-name>log4jConfigLocation</param-name>
  18. <param-value>classpath:log4j.properties</param-value>
  19. </context-param>
  20. <context-param>
  21. <param-name>log4jExposeWebAppRoot</param-name>
  22. <param-value>true</param-value>
  23. </context-param>
  24. <context-param>
  25. <param-name>webAppRootKey</param-name>
  26. <param-value>zoumasuyuanWebApp.root</param-value>
  27. </context-param>
  28. <context-param>
  29. <param-name>log4jRefreshInterval</param-name>
  30. <param-value>600000</param-value>
  31. </context-param>
  32. <context-param>
  33. <param-name>contextConfigLocation</param-name>
  34. <param-value>classpath:applicationContext.xml</param-value>
  35. </context-param>
  36. <listener>
  37. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  38. </listener>
  39. <listener>
  40. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  41. </listener>
  42. <filter>
  43. <filter-name>CharacterEncodingFilter</filter-name>
  44. <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  45. <init-param>
  46. <param-name>encoding</param-name>
  47. <param-value>UTF-8</param-value>
  48. </init-param>
  49. <init-param>
  50. <param-name>forceEncoding</param-name>
  51. <param-value>true</param-value>
  52. </init-param>
  53. </filter>
  54. <filter-mapping>
  55. <filter-name>CharacterEncodingFilter</filter-name>
  56. <url-pattern>/*</url-pattern>
  57. </filter-mapping>
  58. <servlet>
  59. <servlet-name>my-dispatcher</servlet-name>
  60. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  61. <init-param>
  62. <param-name>contextConfigLocation</param-name>
  63. <param-value>classpath:appWebServlet.xml</param-value>
  64. </init-param>
  65. <load-on-startup>1</load-on-startup>
  66. </servlet>
  67. <servlet-mapping>
  68. <servlet-name>my-dispatcher</servlet-name>
  69. <url-pattern>/</url-pattern>
  70. </servlet-mapping>
  71. <jsp-config>
  72. <taglib>
  73. <taglib-uri>el-common</taglib-uri>
  74. <taglib-location>/WEB-INF/el-common.tld</taglib-location>
  75. </taglib>
  76. </jsp-config>
  77. <filter>
  78. <filter-name>cors</filter-name>
  79. <filter-class>com.guangming.interceptor.CrossFilter</filter-class>
  80. </filter>
  81. <filter-mapping>
  82. <filter-name>cors</filter-name>
  83. <url-pattern>/*</url-pattern>
  84. </filter-mapping>
  85. </web-app>