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

<!--
	The default configuration of the servlet context is done in class
	CCInitialiServlets. 
 -->

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         id="WebApp_ID" 
         version="3.1">         
         
  <display-name>CaptainCasa based application</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>

  <!-- ********** CONTEXT PARAMETERS *************************************** -->

  <!-- JBoss Deployment - use the reference implementation that comes
       with CapatainCasa by default -->
  <context-param>
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
    <param-value>true</param-value>
  </context-param>  

  <!-- ********** LISTENERS ************************************************ -->  
  <listener>
    <listener-class>org.eclnt.jsfserver.util.CCServletContextListener</listener-class>
  </listener>
  
  <!--
  PLEASE PAY ATTNETION: the registration of the CCServletContextListener in the web.xml
  is sufficient for many servlet engines (e.g. Tomcat). For other servlet engines (Glassfish,
  JBoss) the regsitration needs to be done through a file "META-INF/services/javax.servlet.ServletContainerInitializer".
  This file needs to be visible to the webapp classloader, i.e. needs to be part of WEB-INF/classes
  or part of one of the .jar libraries in WEB-INF/lib.
  <br><br>
  A template file is coming with CaptainCasa's eclntjsfserver*.jar file, here:
  "META-INF/services/javax.servlet.ServletContainerInitializer_template".
  -->
    
  <!-- ********** SESSION MANAGEMENT *************************************** -->
  <!--
  Changing from COOKIE to URL is possible - but must also be done in system.xml!
  -->
  <session-config>
      <session-timeout>60</session-timeout>
      <tracking-mode>COOKIE</tracking-mode>
      <cookie-config>
          <http-only>true</http-only>
          <secure>true</secure>
      </cookie-config>
  </session-config>
  
  
  <resource-ref>
      <description>MariaDB NanoLeaf Verbindung</description>
      <res-ref-name>jdbc/mariadbnl</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref> 
  
</web-app>
