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

<!-- =============================================================== -->
<!-- Configure the Jetty Server                                      -->
<!--                                                                 -->
<!-- Documentation of this file format can be found at:              -->
<!-- http://docs.codehaus.org/display/JETTY/jetty.xml                -->
<!--                                                                 -->
<!-- =============================================================== -->


<Configure id="Server" class="org.eclipse.jetty.server.Server">

    <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
      <Set name="secureScheme">https</Set>
      <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
      <Set name="outputBufferSize">32768</Set>
      <Set name="requestHeaderSize">8192</Set>
      <Set name="responseHeaderSize">8192</Set>
      <Set name="sendServerVersion">true</Set>
      <Set name="sendDateHeader">false</Set>
      <Set name="headerCacheSize">1024</Set>

      <!-- Uncomment to enable handling of X-Forwarded- style headers
      <Call name="addCustomizer">
        <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
      </Call>
      -->
    </New>

    <!-- =========================================================== -->
    <!-- Set handler Collection Structure                            -->
    <!-- =========================================================== -->
    <Set name="handler">
      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
        <Set name="handlers">
         <Array type="org.eclipse.jetty.server.Handler">
           <Item>
             <New id="WebappContexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
           </Item>
           <Item>
             <New id="vcontexts" class="org.eclipse.jetty.server.handler.ContextHandler">
               <Set name="contextPath">/tests</Set>
               <Set name="VirtualHosts">
                 <Array type="java.lang.String">
                   <Item>VirtualHost</Item>
                 </Array>
               </Set>
               <Set name="ResourceBase"><Property name="test.docroot.base"/>/virtualhost</Set>
               <Set name="Handler"><New id="reshandlervirt" class="org.eclipse.jetty.server.handler.ResourceHandler"/></Set>
               <Set name="DisplayName">virtual</Set>
             </New>
           </Item>
           <Item>
             <New id="defcontext" class="org.eclipse.jetty.server.handler.ContextHandler">
               <Set name="contextPath">/tests</Set>
               <Set name="ResourceBase"><Property name="test.docroot.base"/>/default</Set>
               <Set name="Handler"><New id="reshandlerdefault" class="org.eclipse.jetty.server.handler.ResourceHandler"/></Set>
               <Set name="DisplayName">default</Set>
             </New>
           </Item>
           <Item>
             <New id="echocontext" class="org.eclipse.jetty.server.handler.ContextHandler">
               <Set name="contextPath">/echo</Set>
               <Set name="Handler"><New id="echohandler" class="org.eclipse.jetty.test.support.EchoHandler"/></Set>
               <Set name="DisplayName">echo</Set>
             </New>
           </Item>
         </Array>
        </Set>
      </New>
    </Set>

   <Call name="addBean">
    <Arg>
      <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
        <Set name="contexts">
          <Ref refid="WebappContexts" />
        </Set>
        <Call name="setContextAttribute">
          <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
          <Arg>.*/servlet-api-[^/]*\.jar$</Arg>
        </Call>

        <Call id="webappprovider" name="addAppProvider">
          <Arg>
            <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
              <Set name="monitoredDirName"><Property name="test.resourcesdir" default="src/test/resources" />/webapp-contexts/RFC2616</Set>
              <Set name="scanInterval">1</Set>
              <Set name="extractWars">true</Set>
              <Set name="configurationManager">
                <New class="org.eclipse.jetty.deploy.PropertiesConfigurationManager">
                  <Set name="file"><Property name="test.targetdir" default="target"/>/testable-jetty-server-config.properties</Set>
                </New>
              </Set>
            </New>
          </Arg>
        </Call>

      </New>
    </Arg>
  </Call>

  <!-- =========================================================== -->
  <!-- extra options                                               -->
  <!-- =========================================================== -->
  <Set name="stopAtShutdown">true</Set>
  <Set name="stopTimeout">1000</Set>

</Configure>
