<?xml version="1.0" encoding="UTF-8"?>
<web-app id="vaadin-uitest" version="3.0"
    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_3_0.xsd">

    <!-- THIS IS A DEVELOPMENT AND TESTING web.xml . -->

    <display-name>Vaadin</display-name>
    <description>Vaadin examples</description>

    <context-param>
        <param-name>productionMode</param-name>
        <param-value>false</param-value>
    </context-param>

    <context-param>
        <param-name>resourceCacheTime</param-name>
        <param-value>3600</param-value>
    </context-param>
    <servlet>
        <servlet-name>Embed App 1</servlet-name>
        <servlet-class>com.vaadin.server.LegacyVaadinServlet</servlet-class>
        <init-param>
            <param-name>application</param-name>
            <param-value>com.vaadin.tests.components.button.Buttons</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>
    <servlet>
        <servlet-name>Embed App 2</servlet-name>
        <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
        <init-param>
            <param-name>UI</param-name>
            <param-value>com.vaadin.tests.components.label.MarginsInLabels</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>
    <servlet>
        <servlet-name>GwtRpcTest</servlet-name>
        <servlet-class>com.vaadin.tests.widgetset.server.gwtrpc.GwtRpcServletTest</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>UI provider app</servlet-name>
        <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
        <init-param>
            <param-name>UIProvider</param-name>
            <param-value>com.vaadin.tests.applicationservlet.InitParamUIProvider</param-value>
        </init-param>
        <init-param>
            <param-name>UI</param-name>
            <param-value>com.vaadin.tests.VerifyAssertionsEnabled</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>

    <servlet>
        <servlet-name>VaadinApplicationRunner</servlet-name>
        <servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
        <!-- Non-default values for testing purposes -->
        <init-param>
            <param-name>legacyPropertyToString</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>heartbeatInterval</param-name>
            <param-value>301</param-value>
        </init-param>
        <init-param>
            <param-name>resourceCacheTime</param-name>
            <param-value>3601</param-value>
        </init-param>
        <init-param>
            <param-name>closeIdleSessions</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>testParam</param-name>
            <param-value>42</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>

    <servlet>
        <!-- 
            This servlet is a separate instance for the sole purpose of 
            testing #12446 (com.vaadin.tests.components.ui.TimeoutRedirectResetsOnActivity) 
            because it modifies the VaadinService timeout parameters 
        -->
        <servlet-name>VaadinApplicationRunnerWithTimeoutRedirect</servlet-name>
        <servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
    </servlet>
    
    <servlet>
        <servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
        <servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
        <init-param>
            <param-name>pushmode</param-name>
            <param-value>automatic</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>

    <!-- For testing GAE - the deployment script changes this to use GAEVaadinServlet -->
    <servlet>
        <servlet-name>IntegrationTest</servlet-name>
        <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
        <init-param>
            <param-name>UI</param-name>
            <param-value>com.vaadin.tests.integration.ServletIntegrationUI</param-value>
        </init-param>
        <init-param>
            <param-name>org.atmosphere.cpr.scanClassPath</param-name>
            <param-value>false</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </servlet>

    <servlet-mapping>
        <servlet-name>Embed App 1</servlet-name>
        <url-pattern>/embed1/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Embed App 2</servlet-name>
        <url-pattern>/embed2/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>GwtRpcTest</servlet-name>
        <url-pattern>/VAADIN/widgetsets/com.vaadin.tests.widgetset.TestingWidgetSet/GwtRpcTest/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>UI provider app</servlet-name>
        <url-pattern>/uiprovider/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>VaadinApplicationRunner</servlet-name>
        <url-pattern>/run/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>VaadinApplicationRunnerWithTimeoutRedirect</servlet-name>
        <url-pattern>/12446/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
        <url-pattern>/run-push/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>IntegrationTest</servlet-name>
        <url-pattern>/integration/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>VaadinApplicationRunner</servlet-name>
        <url-pattern>/VAADIN/*</url-pattern>
    </servlet-mapping>

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

</web-app>
