<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    
    <display-name>${context-name}</display-name>
    
    <context-param>
        <param-name>javax.ws.rs.Application</param-name>
        <param-value>org.teiid.jboss.rest.TeiidRestApplication</param-value>
    </context-param>
    
    <context-param>
        <param-name>resteasy.providers</param-name>
        <param-value>org.teiid.jboss.rest.TeiidRSExceptionHandler</param-value>
	</context-param>
    
    <listener>
        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
    </listener>
    
    <servlet>
        <servlet-name>BootstrapServlet</servlet-name>
        <servlet-class>org.teiid.jboss.rest.Bootstrap</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    
    <servlet-mapping>
        <servlet-name>BootstrapServlet</servlet-name>
        <url-pattern>/api</url-pattern>
    </servlet-mapping>
    
    <filter>
        <filter-name>Resteasy</filter-name>
        <filter-class>org.jboss.resteasy.plugins.server.servlet.FilterDispatcher</filter-class>
    </filter>

    <filter>
        <filter-name>ApiOriginFilter</filter-name>
        <filter-class>org.teiid.jboss.rest.ApiOriginFilter</filter-class>
    </filter>
    
    <filter-mapping>
        <filter-name>Resteasy</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>ApiOriginFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

${security-content}
      
</web-app>