web.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  5. http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  6. version="3.1" metadata-complete="false">
  7. <welcome-file-list>
  8. <welcome-file>/index.html</welcome-file>
  9. </welcome-file-list>
  10. <context-param>
  11. <param-name>contextConfigLocation</param-name>
  12. <param-value>classpath:spring/spring-schedule-main.xml</param-value>
  13. </context-param>
  14. <!--logback 日志-->
  15. <context-param>
  16. <param-name>logbackConfigLocation</param-name>
  17. <param-value>classpath:logback.xml</param-value>
  18. </context-param>
  19. <context-param>
  20. <param-name>webAppRootKey</param-name>
  21. <param-value>webPath</param-value>
  22. </context-param>
  23. <listener>
  24. <listener-class>org.springframework.web.util.WebAppRootListener</listener-class>
  25. </listener>
  26. <listener>
  27. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  28. </listener>
  29. <listener>
  30. <listener-class>com.kmall.common.listener.QuartzContextListener</listener-class>
  31. </listener>
  32. <servlet>
  33. <servlet-name>dispatcherServlet</servlet-name>
  34. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  35. <init-param>
  36. <param-name>contextConfigLocation</param-name>
  37. <param-value>classpath:spring/spring-schedule-main.xml</param-value>
  38. </init-param>
  39. <load-on-startup>1</load-on-startup>
  40. </servlet>
  41. <servlet-mapping>
  42. <servlet-name>dispatcherServlet</servlet-name>
  43. <!--url-pattern配置为/时,静态文件处理必须采用tomcat的DefaultServlet先于spring的DispatcherServlet处理-->
  44. <url-pattern>/</url-pattern>
  45. </servlet-mapping>
  46. <error-page>
  47. <error-code>404</error-code>
  48. <location>/404.html</location>
  49. </error-page>
  50. </web-app>