<?xml version="1.0"?>

<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">

  <display-name>sventon - subversion repository browser</display-name>

  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
  </context-param>

  <servlet>
    <servlet-name>sventon</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>sventon-old</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>sventon</servlet-name>
    <url-pattern>/repos/config</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>sventon</servlet-name>
    <url-pattern>/config/reload</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>sventon</servlet-name>
    <url-pattern>/repos/list</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>sventon-old</servlet-name>
    <url-pattern>/repos/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>sventon-old</servlet-name>
    <url-pattern>/ajax/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>sventon-old</servlet-name>
    <url-pattern>/xml/*</url-pattern>
  </servlet-mapping>

  <filter>
    <filter-name>ConfigAuthorizationFilter</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    <init-param>
      <param-name>targetBeanName</param-name>
      <param-value>configAuthorizationFilter</param-value>
    </init-param>
    <init-param>
      <param-name>targetFilterLifecycle</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>

  <filter>
    <filter-name>CharacterEncodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    <init-param>
      <param-name>targetBeanName</param-name>
      <param-value>characterEncodingFilter</param-value>
    </init-param>
    <init-param>
      <param-name>targetFilterLifecycle</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>

  <filter>
    <filter-name>PathParameterFilter</filter-name>
    <filter-class>carbonfive.spring.web.pathparameter.ParameterizedPathFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>ConfigAuthorizationFilter</filter-name>
    <url-pattern>/repos/config</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConfigAuthorizationFilter</filter-name>
    <url-pattern>/repos/listconfigs</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConfigAuthorizationFilter</filter-name>
    <url-pattern>/repos/deleteconfig</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>ConfigAuthorizationFilter</filter-name>
    <url-pattern>/repos/submitconfig</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>CharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>PathParameterFilter</filter-name>
    <url-pattern>/repos/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>PathParameterFilter</filter-name>
    <url-pattern>/ajax/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>PathParameterFilter</filter-name>
    <url-pattern>/xml/*</url-pattern>
  </filter-mapping>

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

  <error-page>
    <error-code>404</error-code>
    <location>/404.jsp</location>
  </error-page>

  <error-page>
    <error-code>500</error-code>
    <location>/500.jsp</location>
  </error-page>

</web-app>
