web.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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>suyuan</display-name>
  13. <context-param>
  14. <param-name>log4jConfigLocation</param-name>
  15. <param-value>classpath:log4j.properties</param-value>
  16. </context-param>
  17. <context-param>
  18. <param-name>log4jExposeWebAppRoot</param-name>
  19. <param-value>true</param-value>
  20. </context-param>
  21. <context-param>
  22. <param-name>webAppRootKey</param-name>
  23. <param-value>suyuanWebApp.root</param-value>
  24. </context-param>
  25. <context-param>
  26. <param-name>log4jRefreshInterval</param-name>
  27. <param-value>600000</param-value>
  28. </context-param>
  29. <context-param>
  30. <param-name>contextConfigLocation</param-name>
  31. <param-value>classpath:applicationContext.xml</param-value>
  32. </context-param>
  33. <listener>
  34. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  35. </listener>
  36. <listener>
  37. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  38. </listener>
  39. <filter>
  40. <filter-name>CharacterEncodingFilter</filter-name>
  41. <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  42. <init-param>
  43. <param-name>encoding</param-name>
  44. <param-value>UTF-8</param-value>
  45. </init-param>
  46. <init-param>
  47. <param-name>forceEncoding</param-name>
  48. <param-value>true</param-value>
  49. </init-param>
  50. </filter>
  51. <filter-mapping>
  52. <filter-name>CharacterEncodingFilter</filter-name>
  53. <url-pattern>/*</url-pattern>
  54. </filter-mapping>
  55. <servlet>
  56. <servlet-name>my-dispatcher</servlet-name>
  57. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  58. <init-param>
  59. <param-name>contextConfigLocation</param-name>
  60. <param-value>classpath:appWebServlet.xml</param-value>
  61. </init-param>
  62. <load-on-startup>1</load-on-startup>
  63. </servlet>
  64. <servlet-mapping>
  65. <servlet-name>my-dispatcher</servlet-name>
  66. <url-pattern>/</url-pattern>
  67. </servlet-mapping>
  68. <jsp-config>
  69. <taglib>
  70. <taglib-uri>el-common</taglib-uri>
  71. <taglib-location>/WEB-INF/el-common.tld</taglib-location>
  72. </taglib>
  73. </jsp-config>
  74. <filter>
  75. <filter-name>cors</filter-name>
  76. <filter-class>com.suyuan.interceptor.CrossFilter</filter-class>
  77. </filter>
  78. <filter-mapping>
  79. <filter-name>cors</filter-name>
  80. <url-pattern>/*</url-pattern>
  81. </filter-mapping>
  82. </web-app>