web.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
  3. <!--
  4. - Contacts web application
  5. - $Id$
  6. - File will be copied into WAR's WEB-INF directory if NOT using container adapter
  7. -->
  8. <web-app>
  9. <display-name>Contacts Sample Application</display-name>
  10. <description>
  11. Example of an application secured using Acegi Security System for Spring.
  12. </description>
  13. <!-- Required for CAS ProxyTicketReceptor servlet. This is the
  14. URL to CAS' "proxy" actuator, where a PGT and TargetService can
  15. be presented to obtain a new proxy ticket. THIS CAN BE
  16. REMOVED IF THE APPLICATION DOESN'T NEED TO ACT AS A PROXY -->
  17. <context-param>
  18. <param-name>edu.yale.its.tp.cas.proxyUrl</param-name>
  19. <param-value>http://localhost:8433/cas/proxy</param-value>
  20. </context-param>
  21. <!--
  22. - Location of the XML file that defines the root application context
  23. - Applied by ContextLoaderListener.
  24. -->
  25. <context-param>
  26. <param-name>contextConfigLocation</param-name>
  27. <param-value>/WEB-INF/applicationContext.xml</param-value>
  28. </context-param>
  29. <filter>
  30. <filter-name>Acegi CAS Processing Filter</filter-name>
  31. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  32. <init-param>
  33. <param-name>targetClass</param-name>
  34. <param-value>net.sf.acegisecurity.ui.cas.CasProcessingFilter</param-value>
  35. </init-param>
  36. </filter>
  37. <filter>
  38. <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
  39. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  40. <init-param>
  41. <param-name>targetClass</param-name>
  42. <param-value>net.sf.acegisecurity.ui.basicauth.BasicProcessingFilter</param-value>
  43. </init-param>
  44. </filter>
  45. <filter>
  46. <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
  47. <filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
  48. </filter>
  49. <filter>
  50. <filter-name>Acegi HTTP Request Security Filter</filter-name>
  51. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  52. <init-param>
  53. <param-name>targetClass</param-name>
  54. <param-value>net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter</param-value>
  55. </init-param>
  56. </filter>
  57. <filter-mapping>
  58. <filter-name>Acegi CAS Processing Filter</filter-name>
  59. <url-pattern>/*</url-pattern>
  60. </filter-mapping>
  61. <filter-mapping>
  62. <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
  63. <url-pattern>/*</url-pattern>
  64. </filter-mapping>
  65. <filter-mapping>
  66. <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
  67. <url-pattern>/*</url-pattern>
  68. </filter-mapping>
  69. <filter-mapping>
  70. <filter-name>Acegi HTTP Request Security Filter</filter-name>
  71. <url-pattern>/*</url-pattern>
  72. </filter-mapping>
  73. <!--
  74. - Loads the root application context of this web app at startup,
  75. - by default from "/WEB-INF/applicationContext.xml".
  76. - Use WebApplicationContextUtils.getWebApplicationContext(servletContext)
  77. - to access it anywhere in the web application, outside of the framework.
  78. -->
  79. <listener>
  80. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  81. </listener>
  82. <!--
  83. - Servlet that dispatches request to registered handlers (Controller implementations).
  84. - Has its own application context, by default defined in "{servlet-name}-servlet.xml",
  85. - i.e. "contacts-servlet.xml".
  86. -
  87. - A web app can contain any number of such servlets.
  88. - Note that this web app does not have a shared root application context,
  89. - therefore the DispatcherServlet contexts do not have a common parent.
  90. -->
  91. <servlet>
  92. <servlet-name>contacts</servlet-name>
  93. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  94. <load-on-startup>1</load-on-startup>
  95. </servlet>
  96. <servlet>
  97. <servlet-name>caucho</servlet-name>
  98. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  99. <load-on-startup>2</load-on-startup>
  100. </servlet>
  101. <!-- CAS servlet which receives a proxy-granting ticket from the CAS
  102. server. THIS CAN BE REMOVED IF THE APPLICATION DOESN'T NEED TO
  103. ACT AS A PROXY -->
  104. <servlet>
  105. <servlet-name>casproxy</servlet-name>
  106. <servlet-class>edu.yale.its.tp.cas.proxy.ProxyTicketReceptor</servlet-class>
  107. <load-on-startup>3</load-on-startup>
  108. </servlet>
  109. <!--
  110. - Maps the contacts dispatcher to /*.
  111. -
  112. -->
  113. <servlet-mapping>
  114. <servlet-name>contacts</servlet-name>
  115. <url-pattern>*.htm</url-pattern>
  116. </servlet-mapping>
  117. <!--
  118. - Dispatcher servlet mapping for HTTP remoting via the Caucho protocols,
  119. - i.e. Hessian and Burlap (see caucho-servlet.xml for the controllers).
  120. -->
  121. <servlet-mapping>
  122. <servlet-name>caucho</servlet-name>
  123. <url-pattern>/caucho/*</url-pattern>
  124. </servlet-mapping>
  125. <servlet-mapping>
  126. <servlet-name>casproxy</servlet-name>
  127. <url-pattern>/casProxy/*</url-pattern>
  128. </servlet-mapping>
  129. <welcome-file-list>
  130. <welcome-file>index.jsp</welcome-file>
  131. </welcome-file-list>
  132. <taglib>
  133. <taglib-uri>/spring</taglib-uri>
  134. <taglib-location>/WEB-INF/spring.tld</taglib-location>
  135. </taglib>
  136. </web-app>