<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<!-- ==================================================================
Configure and deploy the test web application
===================================================================== -->

<Configure id="testWebapp" class="org.eclipse.jetty.ee8.webapp.WebAppContext">

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Required minimal context configuration :                        -->
  <!--  + contextPath                                                  -->
  <!--  + war OR baseResource                                          -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="contextPath">/ee8-test</Set>
  <Set name="war"><Property name="jetty.webapps" default="." />/ee8-demo-jetty.war
  </Set>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Optional context configuration                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="extractWAR">true</Set>
  <Set name="copyWebDir">false</Set>
  <Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault-ee8.xml</Set>
  <Set name="overrideDescriptor"><Property name="jetty.webapps" default="." />/ee8-demo-jetty.d/ee8-demo-jetty-override-web.xml
  </Set>
  
  <!-- Enable WebSocket container -->
  <Call name="setAttribute">
    <Arg>org.eclipse.jetty.websocket.jakarta</Arg>
    <Arg type="Boolean">true</Arg>
  </Call>
  
  <Get name="coreContextHandler">
    <Call name="insertHandler">
      <Arg>
        <New class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
          <Set name="minGzipSize">2048</Set>
        </New>
      </Arg>
    </Call>
  </Get>
</Configure>
