<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_10_0.dtd">

<!--
Configure a custom context for the eepsite.

This context contains only a ServletContextHandler with a default servlet
to serve static html files and images.
-->

<Configure class="org.eclipse.jetty.ee8.servlet.ServletContextHandler">
  <New id="baseroot" class="java.lang.String">
    <Arg>./eepsite/docroot</Arg>
  </New>
  <Set name="contextPath">/</Set>
  <Set name="baseResourceAsString"><Ref refid="baseroot" /></Set>
  <Call name="setInitParameter">
    <Arg>org.eclipse.jetty.servlet.Default.cacheControl</Arg>
    <Arg>max-age=3600,public</Arg>
  </Call>
  <!-- change to false to disallow directory listings -->
  <Call name="setInitParameter">
    <Arg>org.eclipse.jetty.servlet.Default.dirAllowed</Arg>
    <Arg>true</Arg>
  </Call>
  <Call name="addServlet">
    <Arg>net.i2p.servlet.I2PDefaultServlet</Arg>
    <Arg>/</Arg>
  </Call>
  <Call name="setErrorHandler">
    <Arg>
      <New class="net.i2p.servlet.I2PErrorHandler">
        <Arg><Ref refid="baseroot" /></Arg>
      </New>
    </Arg>
  </Call>
</Configure>

