<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <servlet>
        <servlet-name>FacesServlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>DownloadServlet</servlet-name>
        <servlet-class>tvark.servlet.DownloadServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>FacesServlet</servlet-name>
        <url-pattern>/jsf/*</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
       <servlet-name>DownloadServlet</servlet-name>
       <url-pattern>/download.jsp</url-pattern>
    </servlet-mapping>

    <filter>
        <filter-name>TomahawkFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    </filter>

    <filter>
        <filter-name>RedirectFilter</filter-name>
        <filter-class>tvark.RedirectFilter</filter-class>
    </filter>
    
    <filter-mapping>
        <filter-name>TomahawkFilter</filter-name>
        <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>RedirectFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    
    <error-page>
        <exception-type>javax.faces.application.ViewExpiredException</exception-type>
        <location>/jsf/index.jsp</location>
    </error-page>

</web-app>
