web.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. - Tutorial web application
  4. -
  5. - $Id$
  6. -->
  7. <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  8. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
  10. <display-name>Spring Security Tutorial Application</display-name>
  11. <!--
  12. - Location of the XML file that defines the root application context
  13. - Applied by ContextLoaderListener.
  14. -->
  15. <context-param>
  16. <param-name>contextConfigLocation</param-name>
  17. <param-value>
  18. classpath:applicationContext-business.xml
  19. /WEB-INF/applicationContext-security.xml
  20. </param-value>
  21. </context-param>
  22. <context-param>
  23. <param-name>log4jConfigLocation</param-name>
  24. <param-value>/WEB-INF/classes/log4j.properties</param-value>
  25. </context-param>
  26. <context-param>
  27. <param-name>webAppRootKey</param-name>
  28. <param-value>tutorial.root</param-value>
  29. </context-param>
  30. <filter>
  31. <filter-name>springSecurityFilterChain</filter-name>
  32. <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  33. </filter>
  34. <filter-mapping>
  35. <filter-name>springSecurityFilterChain</filter-name>
  36. <url-pattern>/*</url-pattern>
  37. </filter-mapping>
  38. <!--
  39. - Loads the root application context of this web app at startup.
  40. - The application context is then available via
  41. - WebApplicationContextUtils.getWebApplicationContext(servletContext).
  42. -->
  43. <listener>
  44. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  45. </listener>
  46. <!--
  47. - Publishes events for session creation and destruction through the application
  48. - context. Optional unless concurrent session control is being used.
  49. -->
  50. <listener>
  51. <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
  52. </listener>
  53. <listener>
  54. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  55. </listener>
  56. <!--
  57. - Provides core MVC application controller. See contacts-servlet.xml.
  58. -->
  59. <servlet>
  60. <servlet-name>bank</servlet-name>
  61. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  62. <load-on-startup>1</load-on-startup>
  63. </servlet>
  64. <servlet-mapping>
  65. <servlet-name>bank</servlet-name>
  66. <url-pattern>*.html</url-pattern>
  67. </servlet-mapping>
  68. <welcome-file-list>
  69. <welcome-file>index.jsp</welcome-file>
  70. </welcome-file-list>
  71. </web-app>