WEB-INF.web.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- #%L joynr::java::messaging::bounceproxy::bounceproxycontroller %% Copyright (C) 2011 - 2017 BMW Car IT GmbH %% Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. #L% --> <web-app 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"> <!-- Contrary to the Guice servlet documentation, don't define the GuiceFilter here. Reason: When GuiceFilter is defined in web.xml, it is created by the servlet container. No Guice injection is used then. To set filter pipelines in GuiceFilter, a static variable is used. The static variable is then overridden if more than one servlet is deployed in the same JVM (as for integration tests). The servlets return a 404 response then. Using Guice injection for GuiceFilter, a member variable for the pipeline is set for each instance of GuiceFilter, which is the desired behaviour. Instantiation of GuiceFilter is done in the listener defined below. See also these Guice issues: - https://code.google.com/p/google-guice/issues/detail?id=618 - https://code.google.com/p/google-guice/issues/detail?id=635 --> <listener> <listener-class>io.joynr.messaging.bounceproxy.controller.runtime.BounceProxyControllerServletConfig</listener-class> </listener> <session-config> <session-timeout>600</session-timeout> <tracking-mode>URL</tracking-mode> </session-config> </web-app>