web.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  3. <display-name>Spring Security NTLM</display-name>
  4. <!-- 1. Setup two parameters: -->
  5. <!-- a) Spring Security's configuration file -->
  6. <!-- b) Logging configuration file -->
  7. <context-param>
  8. <param-name>contextConfigLocation</param-name>
  9. <param-value>/WEB-INF/applicationContext.xml</param-value>
  10. </context-param>
  11. <context-param>
  12. <param-name>log4jConfigLocation</param-name>
  13. <param-value>/WEB-INF/log4j.properties</param-value>
  14. </context-param>
  15. <!-- 2. Setup the Spring Security Filter Chain Proxy -->
  16. <filter>
  17. <filter-name>filterChainProxy</filter-name>
  18. <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  19. </filter>
  20. <filter-mapping>
  21. <filter-name>filterChainProxy</filter-name>
  22. <url-pattern>/*</url-pattern>
  23. </filter-mapping>
  24. <!-- 3. Setup three listeners -->
  25. <!-- a) Setup a listener to connect spring with the web context -->
  26. <listener>
  27. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  28. </listener>
  29. <!-- b) Setup a listener to connect spring with log4J -->
  30. <listener>
  31. <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  32. </listener>
  33. <!-- c) Setup Spring Security to subscribe to http session events in the web context -->
  34. <listener>
  35. <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
  36. </listener>
  37. <welcome-file-list>
  38. <welcome-file>index.html</welcome-file>
  39. <welcome-file>index.htm</welcome-file>
  40. <welcome-file>index.jsp</welcome-file>
  41. <welcome-file>default.html</welcome-file>
  42. <welcome-file>default.htm</welcome-file>
  43. <welcome-file>default.jsp</welcome-file>
  44. </welcome-file-list>
  45. </web-app>