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

  This file is part of the Meeds project (https://meeds.io/).
  Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 3 of the License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public License
  along with this program; if not, write to the Free Software Foundation,
  Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-->
<web-app
  version="3.0"
  metadata-complete="true"
  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">

  <display-name>deeds-dapp</display-name>

  <filter>
    <filter-name>staticResourceFilter</filter-name>
    <filter-class>io.meeds.dapp.web.filter.StaticResourceFilter</filter-class>
  </filter>

  <filter>
    <filter-name>requestDispatcherFilter</filter-name>
    <filter-class>io.meeds.dapp.web.filter.RequestDispatcherFilter</filter-class>
  </filter>

  <filter>
    <filter-name>tenantPlaceholderRequestDispatcherFilter</filter-name>
    <filter-class>io.meeds.dapp.web.filter.TenantPlaceholderRequestDispatcherFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>staticResourceFilter</filter-name>
    <url-pattern>/static/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>tenantPlaceholderRequestDispatcherFilter</filter-name>
    <url-pattern>/tenant-placeholder</url-pattern>
    <url-pattern>/tenant-placeholder/</url-pattern>
    <url-pattern>/tenant-placeholder/*</url-pattern>
  </filter-mapping>

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

  <servlet>
    <servlet-name>RobotsServlet</servlet-name>
    <servlet-class>io.meeds.dapp.web.servlet.RobotsServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>RobotsServlet</servlet-name>
    <url-pattern>/robots.txt</url-pattern>
  </servlet-mapping>
</web-app>
