web.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="Saga_Dictionary_Web" version="3.0">
  3. <display-name>Archetype Created Web Application</display-name>
  4. <context-param>
  5. <param-name>webAppRootKey</param-name>
  6. <param-value>persagy_weather</param-value>
  7. </context-param>
  8. <context-param>
  9. <param-name>contextConfigLocation</param-name>
  10. <param-value>classpath:config/spring/spring-base.xml</param-value>
  11. </context-param>
  12. <context-param>
  13. <param-name>log4jConfigLocation</param-name>
  14. <param-value>classpath:log4j.properties</param-value>
  15. </context-param>
  16. <listener>
  17. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  18. </listener>
  19. <listener>
  20. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  21. </listener>
  22. <servlet>
  23. <servlet-name>SystemInitServlet</servlet-name>
  24. <servlet-class>com.persagy.framework.servlet.SystemInitServlet</servlet-class>
  25. <load-on-startup>0</load-on-startup>
  26. </servlet>
  27. <filter>
  28. <filter-name>CharacterEncodingFilter</filter-name>
  29. <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  30. <init-param>
  31. <param-name>encoding</param-name>
  32. <param-value>utf-8</param-value>
  33. </init-param>
  34. </filter>
  35. <filter-mapping>
  36. <filter-name>CharacterEncodingFilter</filter-name>
  37. <url-pattern>/*</url-pattern>
  38. </filter-mapping>
  39. <!-- CORS过滤器start -->
  40. <filter>
  41. <filter-name>corsFilter</filter-name>
  42. <filter-class>com.persagy.framework.filter.CorsFilter</filter-class>
  43. </filter>
  44. <filter-mapping>
  45. <filter-name>corsFilter</filter-name>
  46. <url-pattern>/*</url-pattern>
  47. </filter-mapping>
  48. <!-- CORS过滤器end -->
  49. <servlet>
  50. <servlet-name>SpringMVC</servlet-name>
  51. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  52. <init-param>
  53. <param-name>contextConfigLocation</param-name>
  54. <param-value>classpath:config/spring/spring-mvc.xml</param-value>
  55. </init-param>
  56. <load-on-startup>1</load-on-startup>
  57. </servlet>
  58. <servlet-mapping>
  59. <servlet-name>SpringMVC</servlet-name>
  60. <url-pattern>/Spring/MVC/*</url-pattern>
  61. </servlet-mapping>
  62. <welcome-file-list>
  63. <welcome-file>index.jsp</welcome-file>
  64. </welcome-file-list>
  65. </web-app>