<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.Server">

  <!-- Configure the listeners -->
  <Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.SocketListener">
        <Set name="Port"><SystemProperty name="jetty.port" default="8080"/></Set>
        <Set name="MinThreads">5</Set>
        <Set name="MaxThreads">255</Set>
        <Set name="MaxIdleTimeMs">30000</Set>
        <Set name="MaxReadTimeMs">10000</Set>
        <Set name="MaxStopTimeMs">5000</Set>
        <Set name="LowResourcePersistTimeMs">2000</Set>
      </New>
    </Arg>
  </Call>


<!--  Uncomment this to add an SSL listener.
  <Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.SunJsseListener">
        <Set name="Port">8443</Set>
        <Set name="MinThreads">5</Set>
        <Set name="MaxThreads">255</Set>
        <Set name="MaxIdleTimeMs">30000</Set>
        <Set name="MaxReadTimeMs">10000</Set>
        <Set name="MaxStopTimeMs">5000</Set>
        <Set name="LowResourcePersistTimeMs">2000</Set>
        <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/etc/demokeystore</Set>
	<Set name="Password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
	<Set name="KeyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
      </New>
    </Arg>
  </Call>
-->

  <Call name="addContext">
    <Arg>/</Arg>

    <Call name="addHandler">
      <Arg><New class="org.mortbay.http.handler.ProxyHandler"></New></Arg>
    </Call>

    <Call name="addHandler">
      <Arg><New class="org.mortbay.http.handler.HTAccessHandler">
	    <Set name="AccessFile">.htaccess</Set>
      </New></Arg>
    </Call>

    <Call name="addServlet">
      <Arg>Dump</Arg>
      <Arg>/dump/*:*.DUMP</Arg>
      <Arg>org.mortbay.servlet.Dump</Arg>
      <Put name="InitParam">Value</Put>
    </Call>
    <Call name="addServlet">
      <Arg>Session</Arg>
      <Arg>/session/*</Arg>
      <Arg>org.mortbay.servlet.SessionDump</Arg>
    </Call>

    <Set name="ResourceBase"><SystemProperty name="jetty.home" default="."/>/demo/docroot/</Set>
    <Set name="ServingResources">TRUE</Set>

    <Call name="addHandler">
      <Arg><New class="org.mortbay.http.handler.DumpHandler"/></Arg>
    </Call>

    <Set name="ClassPath"><SystemProperty name="jetty.home" default="."/>/demo/servlets/</Set>
    <Set name="DynamicServletPathSpec">/servlet/*</Set>
  </Call>



  <Call name="addContext">
    <Arg>/javadoc/*</Arg>
    <Set name="ResourceBase"><SystemProperty name="jetty.home" default="."/>/javadoc/</Set>
    <Set name="ServingResources">TRUE</Set>
  </Call>

  <Call name="addContext">
    <Arg>/cgi-bin/*</Arg>
    <Set name="ResourceBase"><SystemProperty name="jetty.home" default="."/>/cgi-bin/</Set>
    <Call name="addServlet">
      <Arg>Common Gateway Interface</Arg>
      <Arg>/</Arg>
      <Arg>org.mortbay.servlet.CGI</Arg>
     <Put name="Path">/bin:/usr/bin:/usr/local/bin</Put>
    </Call>
  </Call>


  <Call name="addRealm">
    <Arg>
      <New class="org.mortbay.http.HashUserRealm">
        <Arg>Jetty Demo Realm</Arg>
        <Arg><SystemProperty name="jetty.home" default="."/>/etc/demoRealm.properties</Arg>
      </New>
    </Arg>
  </Call>

  <Call name="addRealm">
    <Arg>
      <New class="org.mortbay.http.HashUserRealm">
        <Arg>Example Form-Based Authentication Area</Arg>
        <Arg><SystemProperty name="jetty.home" default="."/>/etc/examplesRealm.properties</Arg>
      </New>
    </Arg>
  </Call>

  <Set name="RequestLog">
    <New class="org.mortbay.http.NCSARequestLog">
      <Arg><SystemProperty name="jetty.log" default="./logs"/>/yyyy_mm_dd.request.log</Arg>
      <Set name="retainDays">90</Set>
      <Set name="append">true</Set>
      <Set name="extended">true</Set>
      <Set name="LogTimeZone">GMT</Set>
    </New>
  </Set>

</Configure>

