web.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  3. <display-name>ResistanceMonitor</display-name>
  4. <welcome-file-list>
  5. <welcome-file>login.jsp</welcome-file>
  6. </welcome-file-list>
  7. <error-page>
  8. <error-code>404</error-code>
  9. <location>/404.html</location>
  10. </error-page>
  11. <context-param>
  12. <param-name>contextConfigLocation</param-name>
  13. <param-value>classpath:applicationContext.xml</param-value>
  14. </context-param>
  15. <context-param>
  16. <param-name>application.version</param-name>
  17. <param-value>2.0.4
  18. </param-value>
  19. </context-param>
  20. <listener>
  21. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  22. </listener>
  23. <servlet>
  24. <servlet-name>springmvc</servlet-name>
  25. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  26. <!--
  27. <init-param>
  28. <param-name>contextConfigLocation</param-name>
  29. <param-value>classpath:applicationContext.xml</param-value>
  30. </init-param>
  31. -->
  32. </servlet>
  33. <servlet-mapping>
  34. <servlet-name>springmvc</servlet-name>
  35. <url-pattern>*.cpp</url-pattern>
  36. </servlet-mapping>
  37. <filter>
  38. <filter-name>DruidWebStatFilter</filter-name>
  39. <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
  40. <init-param>
  41. <param-name>exclusions</param-name>
  42. <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>
  43. </init-param>
  44. </filter>
  45. <filter-mapping>
  46. <filter-name>DruidWebStatFilter</filter-name>
  47. <url-pattern>/*</url-pattern>
  48. </filter-mapping>
  49. <servlet>
  50. <servlet-name>DruidStatView</servlet-name>
  51. <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
  52. </servlet>
  53. <servlet-mapping>
  54. <servlet-name>DruidStatView</servlet-name>
  55. <url-pattern>/druid/*</url-pattern>
  56. </servlet-mapping>
  57. <filter>
  58. <filter-name>cors</filter-name>
  59. <filter-class>com.company.controller.SimpleCORSFilter</filter-class>
  60. </filter>
  61. <filter-mapping>
  62. <filter-name>cors</filter-name>
  63. <url-pattern>/*</url-pattern>
  64. </filter-mapping>
  65. </web-app>