<?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"
         id="community"
         version="2.5">

   <listener>
	<listener-class>
             org.crosswire.community.web.VMRCREServletContextListener 
        </listener-class>
   </listener>

<security-constraint>
        <web-resource-collection>
                <web-resource-name>SQL scripts</web-resource-name>
                <description>accessible by authenticated users of the communitysql role</description>
                <url-pattern>/utils/SQL.jsp</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
                <http-method>PUT</http-method>
                <http-method>DELETE</http-method>
        </web-resource-collection>
        <auth-constraint>
                <description>These roles are allowed access</description>
                <role-name>communitysql</role-name>
        </auth-constraint>
</security-constraint>

<login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>community sql user</realm-name>
</login-config>

<security-role>
        <description>Login for sql users.</description>
        <role-name>communitysql</role-name>
</security-role>





  <display-name>Welcome to The INTF Community</display-name>
  <description>
     Welcome to The INTF Community
  </description>
  <jsp-config>
  <taglib>
    <taglib-uri>/WEB-INF/lib/crosswire-i18n.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/crosswire-i18n.tld</taglib-location>
  </taglib>
  </jsp-config>

    <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>
          org.apache.catalina.servlets.DefaultServlet
        </servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
	
<!-- this only works after tomcat 7.0.41
<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
  <init-param>
    <param-name>cors.allowed.origins</param-name>
    <param-value>*, null</param-value>
  </init-param>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
 -->
<!-- this is pre tomcat 7.0.41
<filter>
	<filter-name>CORS</filter-name>
	<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
        <init-param>
                <param-name>cors.allowOrigin</param-name>
                <param-value>*</param-value>
        </init-param>

</filter>
<filter-mapping>
        <filter-name>CORS</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>
 -->
</web-app>
