web.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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"
  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. <display-name>edu-api-weixin Web Application</display-name>
  7. <filter>
  8. <filter-name>ajax</filter-name>
  9. <filter-class>cn.efunbox.filter.YunosApiFilter</filter-class>
  10. <init-param>
  11. <param-name>encoding</param-name>
  12. <param-value>utf-8</param-value>
  13. </init-param>
  14. </filter>
  15. <filter-mapping>
  16. <filter-name>ajax</filter-name>
  17. <url-pattern>/*</url-pattern>
  18. </filter-mapping>
  19. <context-param>
  20. <param-name>contextConfigLocation</param-name>
  21. <param-value>classpath:spring.xml</param-value>
  22. </context-param>
  23. <filter>
  24. <description>字符集过滤器</description>
  25. <filter-name>encodingFilter</filter-name>
  26. <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  27. <init-param>
  28. <description>字符集编码</description>
  29. <param-name>encoding</param-name>
  30. <param-value>UTF-8</param-value>
  31. </init-param>
  32. <init-param>
  33. <param-name>forceEncoding</param-name>
  34. <param-value>true</param-value>
  35. </init-param>
  36. </filter>
  37. <filter-mapping>
  38. <filter-name>encodingFilter</filter-name>
  39. <url-pattern>/*</url-pattern>
  40. </filter-mapping>
  41. <listener>
  42. <description>spring Listener</description>
  43. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  44. </listener>
  45. <servlet>
  46. <servlet-name>springMvc</servlet-name>
  47. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  48. <init-param>
  49. <param-name>contextConfigLocation</param-name>
  50. <param-value>classpath:spring-mvc.xml</param-value>
  51. </init-param>
  52. <load-on-startup>1</load-on-startup>
  53. </servlet>
  54. <servlet-mapping>
  55. <servlet-name>springMvc</servlet-name>
  56. <url-pattern>/</url-pattern>
  57. </servlet-mapping>
  58. <servlet-mapping>
  59. <servlet-name>default</servlet-name>
  60. <url-pattern>*.html</url-pattern>
  61. </servlet-mapping>
  62. <listener>
  63. <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  64. </listener>
  65. <welcome-file-list>
  66. <welcome-file>index.jsp</welcome-file>
  67. </welcome-file-list>
  68. </web-app>