<?xml version="1.0" encoding="ISO-8859-1"?>


<web-app 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"
  version="2.4">

  <!--
    - Location of the Log4J config file, for initialization and refresh checks.
    - Applied by Log4jConfigListener.
  -->
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:log4j.properties</param-value>
  </context-param>
  
  <context-param>
    <!-- the default log4j.properties does not make use of the webapp root feature -->
    <param-name>log4jExposeWebAppRoot</param-name>
    <param-value>false</param-value>
  </context-param>
  
  <context-param>
    <param-name>log4jRefreshInterval</param-name>
    <!-- interval in milliseconds for checking log4j config for updates -->
    <param-value>60000</param-value>
  </context-param>
  
  <!--
    - Configures Log4J for this web app.
    - As this context specifies a context-param "log4jConfigLocation", its file path
    - is used to load the Log4J configuration, including periodic refresh checks.
    -
    - Would fall back to default Log4J initialization (non-refreshing) if no special
    - context-params are given.
    -
    - Optionally exposes a "web app root key", i.e. a system property that specifies the root
    - directory of this web app, for usage in log file paths.
  -->
  <listener>
    <listener-class>
      org.springframework.web.util.Log4jConfigListener
    </listener-class>
  </listener>

	<listener>
		<listener-class>org.jasig.portal.tools.checks.CheckingContextListener</listener-class>
	</listener>

  <servlet>
    <servlet-name>uPortal</servlet-name>
    <servlet-class>org.jasig.portal.PortalSessionManager</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>Login</servlet-name>
    <servlet-class>org.jasig.portal.LoginServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>Logout</servlet-name>
    <servlet-class>org.jasig.portal.LogoutServlet</servlet-class>
    <load-on-startup>3</load-on-startup>
  </servlet>

<!-- Uncomment this servlet and the corresponding servlet-mapping if ProxyWriter is enabled in portal.properties
  <servlet>
    <servlet-name>HttpProxyServlet</servlet-name>
    <servlet-class>org.jasig.portal.HttpProxyServlet</servlet-class>
  </servlet>
  -->  
  
  <servlet>
    <servlet-name>Problems</servlet-name>
    <servlet-class>org.jasig.portal.Problems</servlet-class>
  </servlet>

  <servlet>
    <servlet-name>Instrumentation</servlet-name>
    <servlet-class>org.jasig.portal.tools.checks.ChecksServlet</servlet-class>
  </servlet>

  <servlet>
    <servlet-name>RetrieveChannelListServlet</servlet-name>
    <servlet-class>org.jasig.portal.layout.dlm.remoting.RetrieveChannelListServlet</servlet-class>
  </servlet>
  
  <servlet>
    <servlet-name>UpdatePreferencesServlet</servlet-name>
    <servlet-class>org.jasig.portal.layout.dlm.remoting.UpdatePreferencesServlet</servlet-class>
  </servlet>
    
  <servlet-mapping>
    <servlet-name>uPortal</servlet-name>
    <url-pattern>*.uP</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/Login</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Logout</servlet-name>
    <url-pattern>/Logout</url-pattern>
  </servlet-mapping>

<!-- Uncomment this servlet-mapping and the corresponding servlet if ProxyWriter is enabled in portal.properties
  <servlet-mapping>
    <servlet-name>HttpProxyServlet</servlet-name>
    <url-pattern>/servlet/ProxyServlet/*</url-pattern>
  </servlet-mapping>
-->
  

  <servlet-mapping>
    <servlet-name>uPortal</servlet-name>
    <url-pattern>/worker/download/*</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>Problems</servlet-name>
    <url-pattern>/problems</url-pattern>
  </servlet-mapping>
  
   <servlet-mapping>
    <servlet-name>Instrumentation</servlet-name>
    <url-pattern>/instrumentation</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>RetrieveChannelListServlet</servlet-name>
    <url-pattern>/ajax/channelList</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>UpdatePreferencesServlet</servlet-name>
    <url-pattern>/ajax/preferences</url-pattern>
  </servlet-mapping>

  <mime-mapping>
    <extension>wbmp</extension>
    <mime-type>image/vnd.wap.wbmp</mime-type>
  </mime-mapping>

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

  <resource-ref>
    <description>
      Resource reference to a factory for java.sql.Connection
      instances that may be used for talking to the portal
      database that is configured in the server.xml file.
    </description>
    <res-ref-name>jdbc/PortalDb</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>

  <resource-ref>
    <description>
      Resource reference to a factory for java.sql.Connection
      instances that may be used for talking to a
      database that may referenced in the PersonDirs.xml file
      and configured in the server.xml file.
    </description>
    <res-ref-name>jdbc/PersonDb</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
</web-app>
