web.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. - Contacts web application
  4. -
  5. -->
  6. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  7. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  8. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  9. <display-name>Contacts Sample Application</display-name>
  10. <!--
  11. - Location of the XML file that defines the root application context
  12. - Applied by ContextLoaderListener.
  13. -->
  14. <context-param>
  15. <param-name>contextConfigLocation</param-name>
  16. <param-value>
  17. classpath:applicationContext-common-business.xml
  18. classpath:applicationContext-common-authorization.xml
  19. classpath:applicationContext-security.xml
  20. </param-value>
  21. </context-param>
  22. <!-- Nothing below here needs to be modified -->
  23. <context-param>
  24. <param-name>webAppRootKey</param-name>
  25. <param-value>contacts.root</param-value>
  26. </context-param>
  27. <filter>
  28. <filter-name>localizationFilter</filter-name>
  29. <filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
  30. </filter>
  31. <filter>
  32. <filter-name>springSecurityFilterChain</filter-name>
  33. <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  34. </filter>
  35. <filter-mapping>
  36. <filter-name>localizationFilter</filter-name>
  37. <url-pattern>/*</url-pattern>
  38. </filter-mapping>
  39. <filter-mapping>
  40. <filter-name>springSecurityFilterChain</filter-name>
  41. <url-pattern>/*</url-pattern>
  42. </filter-mapping>
  43. <!--
  44. - Loads the root application context of this web app at startup.
  45. - The application context is then available via
  46. - WebApplicationContextUtils.getWebApplicationContext(servletContext).
  47. -->
  48. <listener>
  49. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  50. </listener>
  51. <!--
  52. - Provides core MVC application controller. See contacts-servlet.xml.
  53. -->
  54. <servlet>
  55. <servlet-name>contacts</servlet-name>
  56. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  57. <load-on-startup>1</load-on-startup>
  58. </servlet>
  59. <!--
  60. - Provides web services endpoint. See remoting-servlet.xml.
  61. -->
  62. <servlet>
  63. <servlet-name>remoting</servlet-name>
  64. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  65. <load-on-startup>2</load-on-startup>
  66. </servlet>
  67. <servlet-mapping>
  68. <servlet-name>contacts</servlet-name>
  69. <url-pattern>*.htm</url-pattern>
  70. </servlet-mapping>
  71. <servlet-mapping>
  72. <servlet-name>remoting</servlet-name>
  73. <url-pattern>/remoting/*</url-pattern>
  74. </servlet-mapping>
  75. <welcome-file-list>
  76. <welcome-file>index.jsp</welcome-file>
  77. </welcome-file-list>
  78. <error-page>
  79. <error-code>403</error-code>
  80. <location>/error.html</location>
  81. </error-page>
  82. </web-app>