<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd"><!-- =============================================================== -->
<!-- Configure the Jetty Server                                      -->
<!-- =============================================================== -->
<Configure class="org.mortbay.jetty.Server">

  <!-- =============================================================== -->
  <!-- Configure Logging                                               -->
  <!-- =============================================================== -->

  
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Configure Jetty Logging.                                        -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Uncomment if using jetty logging.
  <Call class="org.apache.commons.logging.LogFactory" name="getFactory">
    <Call name="getInstance">
      <Arg/>
      <Call name="reset"/>
      <Call name="add">
        <Arg>
          <New class="org.mortbay.log.OutputStreamLogSink">
            <Set name="filename"><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.jetty.log</Set>
            <Set name="retainDays">90</Set>
            <Set name="append">true</Set>
            <Set name="logLabels">true</Set>
            <Set name="logStackSize">true</Set>
            <Set name="logStackTrace">false</Set>
            <Set name="logOneLine">false</Set>
            <Set name="suppressStack">false</Set>
            <Set name="logTimeZone">GMT</Set>
          </New>
        </Arg>
      </Call>
    </Call>
  </Call>
  -->
  
  <!-- =============================================================== -->
  <!-- Configure the Request Listeners                                 -->
  <!-- =============================================================== -->

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Add and configure a HTTP listener to port 8080                       -->
  <!-- The default port can be changed using: java -Djetty.port=80     -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <Call name="addListener">
        <Arg>
            <New class="org.mortbay.http.SocketListener">
                <Set name="Port">
                    <SystemProperty name="jetty.port" default="8080"/>
                </Set>
                <Set name="PoolName">P1</Set>
                <Set name="MinThreads">10</Set>
                <Set name="MaxThreads">200</Set>
                <Set name="MaxIdleTimeMs">30000</Set>
                <Set name="lowResources">50</Set>
                <Set name="LowResourcePersistTimeMs">2000</Set>
                <Set name="acceptQueueSize">0</Set>
                <Set name="ConfidentialPort">8443</Set>
                <Set name="IntegralPort">8443</Set>
            </New>
        </Arg>
    </Call>


  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Add a HTTPS SSL listener on port 8443                           -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- UNCOMMENT TO ACTIVATE 
    <Call name="addListener">
        <Arg>
            <New class="org.mortbay.http.SunJsseListener">
                <Set name="Port">8443</Set>
                <Set name="PoolName">P1</Set>
                <Set name="MaxIdleTimeMs">30000</Set>
                <Set name="lowResources">30</Set>
                <Set name="LowResourcePersistTimeMs">2000</Set>
                <Set name="Keystore">
                    <SystemProperty name="jetty.home"
                            default="."/>/etc/demokeystore</Set>
                <Set name="Password">secret</Set>
                <Set name="KeyPassword">secret</Set>
                <Set name="HttpHandler">
                    <New class="org.mortbay.http.handler.MsieSslHandler">
                        <Set name="UserAgentSubString">MSIE 5</Set>
                    </New>
                </Set>
            </New>
        </Arg>
    </Call>
  -->

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Add a AJP13 listener on port 8009                               -->
  <!-- This protocol can be used with mod_jk in apache, IIS etc.       -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--
  <Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.ajp.AJP13Listener">
        <Set name="Port">8009</Set>
        <Set name="MinThreads">5</Set>
        <Set name="MaxThreads">20</Set>
        <Set name="MaxIdleTimeMs">0</Set>
        <Set name="confidentialPort">443</Set>
      </New>
    </Arg>
  </Call>
  -->


  <!-- =============================================================== -->
  <!-- Configure the Contexts                                          -->
  <!-- =============================================================== -->


  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Add a all web application within the webapps directory.         -->
  <!-- + No virtual host specified                                     -->
  <!-- + Look in the webapps directory relative to jetty.home or .     -->
  <!-- + Use the webdefault.xml resource for the defaults descriptor   -->
  <!-- + Upack the war file                                            -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!--Set name="rootWebApp">exist</Set-->
  <!--Call name="addWebApplications">
    <Arg></Arg>
    <Arg><SystemProperty name="jetty.home" default="."/>/webapps/</Arg>
    <Arg><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Arg>
    <Arg type="boolean">true</Arg>
  </Call-->

    <Call name="addWebApplication">
        <Arg>/exist</Arg>
        <Arg>
            <SystemProperty name="exist.home" default="../.."/>/webapp/</Arg>
        <Set name="defaultsDescriptor">
            <SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
        <Set name="displayName">exist</Set>
    </Call>
  
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Add and configure a specific web application                    -->
  <!-- + Set Unpack WAR files                                          -->
  <!-- + Set Default Descriptor.  Resource, file or URL                -->
  <!-- + Set Virtual Hosts. A Null host or empty array means all hosts -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- UNCOMMENT TO ACTIVATE
  <Call name="addWebApplication">
    <Arg>/context</Arg>
    <Arg>./webapps/root</Arg>

    <Set name="extractWAR">false</Set> 

    <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>

    <Set name="virtualHosts">
      <Array type="java.lang.String">
        <Item></Item>
        <Item>127.0.0.1</Item>
        <Item>localhost</Item>
        <Item>www.acme.com</Item>
      </Array>
    </Set>
  </Call>
  -->

  <!-- =============================================================== -->
  <!-- Configure the Request Log                                       -->
  <!-- =============================================================== -->
    <Set name="RequestLog">
        <New class="org.mortbay.http.NCSARequestLog">
            <Arg>
                <SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Arg>
            <Set name="retainDays">90</Set>
            <Set name="append">true</Set>
            <Set name="extended">false</Set>
            <Set name="LogTimeZone">GMT</Set>
        </New>
    </Set>

  <!-- =============================================================== -->
  <!-- Configure the Other Server Options                              -->
  <!-- =============================================================== -->
    <Set name="requestsPerGC">2000</Set>
    <Set name="statsOn">false</Set>
    <Set class="org.mortbay.util.FileResource" name="checkAliases" type="boolean">true</Set>
</Configure>









