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

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

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

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Required minimal context configuration :                        -->
  <!--  + contextPath                                                  -->
  <!--  + war OR baseResource                                          -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="contextPath">/ee9-test</Set>
  <Set name="war"><Property name="jetty.webapps" default="." />/ee9-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-ee9.xml</Set>
  <Set name="overrideDescriptor"><Property name="jetty.webapps" default="." />/ee9-demo-jetty.d/ee9-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>
