<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<!--
  - Contacts web application
  -
  - $Id: web.xml 1741 2006-11-14 03:18:42Z benalex $
  -->

<web-app>

    <display-name>Contacts Sample Application</display-name>

	<!--
	  - Location of the XML file that defines the root application context
	  - Applied by ContextLoaderListener.
	  -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/applicationContext-acegi-security.xml
			classpath:applicationContext-common-business.xml
			classpath:applicationContext-common-authorization.xml
		</param-value>
	</context-param>


	<!--
	     Required for CAS ProxyTicketReceptor servlet. This is the
	     URL to CAS' "proxy" actuator, where a PGT and TargetService can
	     be presented to obtain a new proxy ticket. THIS CAN BE
	     REMOVED IF THE APPLICATION DOESN'T NEED TO ACT AS A PROXY
	  -->

    <context-param>
        <param-name>edu.yale.its.tp.cas.proxyUrl</param-name>
        <param-value>http://localhost:8433/cas/proxy</param-value>
    </context-param>

   <!-- Nothing below here needs to be modified -->

	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>/WEB-INF/classes/log4j.properties</param-value>
	</context-param>


   <filter>
        <filter-name>Acegi Filter Chain Proxy</filter-name>
        <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
        <init-param>
            <param-name>targetClass</param-name>
            <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
        </init-param>
   </filter>

    <filter-mapping>
      <filter-name>Acegi Filter Chain Proxy</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

	<!--
	  - Loads the root application context of this web app at startup.
	  - The application context is then available via
	  - WebApplicationContextUtils.getWebApplicationContext(servletContext).
    -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<listener>
		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
	</listener>

    <!--
        The HttpSessionEventPublisher will publish
        HttpSessionCreatedEvent and HttpSessionDestroyedEvent
        to the WebApplicationContext
 -->
    <listener>
        <listener-class>org.acegisecurity.ui.session.HttpSessionEventPublisher</listener-class>
    </listener>

  <!--
	- Provides core MVC application controller. See contacts-servlet.xml.
    -->
	<servlet>
		<servlet-name>contacts</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

  <!--
    - Provides web services endpoint. See remoting-servlet.xml.
    -->
	<servlet>
		<servlet-name>remoting</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>

	<servlet-mapping>
    	<servlet-name>contacts</servlet-name>
    	<url-pattern>*.htm</url-pattern>
 	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>remoting</servlet-name>
		<url-pattern>/remoting/*</url-pattern>
	</servlet-mapping>

 	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<error-page>
		<error-code>403</error-code>
		<location>/error.html</location>
	</error-page>

    <taglib>
      <taglib-uri>/spring</taglib-uri>
      <taglib-location>/WEB-INF/spring.tld</taglib-location>
  	</taglib>

</web-app>
