web.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 Channel 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.securechannel.ChannelProcessingFilter</param-value>
  35. </init-param>
  36. </filter>
  37. <filter>
  38. <filter-name>Acegi CAS Processing 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.cas.CasProcessingFilter</param-value>
  43. </init-param>
  44. </filter>
  45. <filter>
  46. <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
  47. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  48. <init-param>
  49. <param-name>targetClass</param-name>
  50. <param-value>net.sf.acegisecurity.ui.basicauth.BasicProcessingFilter</param-value>
  51. </init-param>
  52. </filter>
  53. <filter>
  54. <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
  55. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  56. <init-param>
  57. <param-name>targetClass</param-name>
  58. <param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
  59. </init-param>
  60. </filter>
  61. <filter>
  62. <filter-name>Acegi HTTP Request Security Filter</filter-name>
  63. <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
  64. <init-param>
  65. <param-name>targetClass</param-name>
  66. <param-value>net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter</param-value>
  67. </init-param>
  68. </filter>
  69. <filter-mapping>
  70. <filter-name>Acegi Channel Processing Filter</filter-name>
  71. <url-pattern>/*</url-pattern>
  72. </filter-mapping>
  73. <filter-mapping>
  74. <filter-name>Acegi CAS Processing Filter</filter-name>
  75. <url-pattern>/*</url-pattern>
  76. </filter-mapping>
  77. <filter-mapping>
  78. <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
  79. <url-pattern>/*</url-pattern>
  80. </filter-mapping>
  81. <filter-mapping>
  82. <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
  83. <url-pattern>/*</url-pattern>
  84. </filter-mapping>
  85. <filter-mapping>
  86. <filter-name>Acegi HTTP Request Security Filter</filter-name>
  87. <url-pattern>/*</url-pattern>
  88. </filter-mapping>
  89. <!--
  90. - Loads the root application context of this web app at startup,
  91. - by default from "/WEB-INF/applicationContext.xml".
  92. - Use WebApplicationContextUtils.getWebApplicationContext(servletContext)
  93. - to access it anywhere in the web application, outside of the framework.
  94. -->
  95. <listener>
  96. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  97. </listener>
  98. <!--
  99. - Servlet that dispatches request to registered handlers (Controller implementations).
  100. - Has its own application context, by default defined in "{servlet-name}-servlet.xml",
  101. - i.e. "contacts-servlet.xml".
  102. -
  103. - A web app can contain any number of such servlets.
  104. - Note that this web app does not have a shared root application context,
  105. - therefore the DispatcherServlet contexts do not have a common parent.
  106. -->
  107. <servlet>
  108. <servlet-name>contacts</servlet-name>
  109. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  110. <load-on-startup>1</load-on-startup>
  111. </servlet>
  112. <servlet>
  113. <servlet-name>caucho</servlet-name>
  114. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  115. <load-on-startup>2</load-on-startup>
  116. </servlet>
  117. <!-- CAS servlet which receives a proxy-granting ticket from the CAS
  118. server. THIS CAN BE REMOVED IF THE APPLICATION DOESN'T NEED TO
  119. ACT AS A PROXY -->
  120. <servlet>
  121. <servlet-name>casproxy</servlet-name>
  122. <servlet-class>edu.yale.its.tp.cas.proxy.ProxyTicketReceptor</servlet-class>
  123. <load-on-startup>3</load-on-startup>
  124. </servlet>
  125. <!--
  126. - Maps the contacts dispatcher to /*.
  127. -
  128. -->
  129. <servlet-mapping>
  130. <servlet-name>contacts</servlet-name>
  131. <url-pattern>*.htm</url-pattern>
  132. </servlet-mapping>
  133. <!--
  134. - Dispatcher servlet mapping for HTTP remoting via the Caucho protocols,
  135. - i.e. Hessian and Burlap (see caucho-servlet.xml for the controllers).
  136. -->
  137. <servlet-mapping>
  138. <servlet-name>caucho</servlet-name>
  139. <url-pattern>/caucho/*</url-pattern>
  140. </servlet-mapping>
  141. <servlet-mapping>
  142. <servlet-name>casproxy</servlet-name>
  143. <url-pattern>/casProxy/*</url-pattern>
  144. </servlet-mapping>
  145. <welcome-file-list>
  146. <welcome-file>index.jsp</welcome-file>
  147. </welcome-file-list>
  148. <taglib>
  149. <taglib-uri>/spring</taglib-uri>
  150. <taglib-location>/WEB-INF/spring.tld</taglib-location>
  151. </taglib>
  152. </web-app>