* Simplify default eepsite base and CGI contexts to use a Context

instead of a ContextHolder, ServletHandler, and ServletHolder.
    This also fixes / which returned a zero-length file,
    broken in the last checkin.
This commit is contained in:
zzz
2012-03-09 20:00:18 +00:00
parent 0c55af2622
commit 5ab17da73d
4 changed files with 24 additions and 36 deletions

View File

@@ -2,6 +2,8 @@
* Update default eepsite base context to use DefaultServlet
instead of ResourceHandler, to provide resume, directory
indexes, caching, etc.
* Simplify default eepsite base and CGI contexts to use a Context
instead of a ContextHolder, ServletHandler, and ServletHolder
2012-03-08 zzz
* GarlicConfig: Remove unused reply block methods

View File

@@ -4,26 +4,16 @@
<!--
Configure a custom context for the eepsite.
This context contains only a ServletHandler with a default servlet
This context contains only a Context with a default servlet
to serve static html files and images.
-->
<Configure class="org.mortbay.jetty.handler.ContextHandler">
<Configure class="org.mortbay.jetty.servlet.Context">
<Set name="contextPath">/</Set>
<Set name="resourceBase">./eepsite/docroot/</Set>
<Set name="handler">
<New class="org.mortbay.jetty.servlet.ServletHandler" >
<Call name="addServletWithMapping">
<Arg>
<New class="org.mortbay.jetty.servlet.ServletHolder">
<Arg>
<New class="org.mortbay.jetty.servlet.DefaultServlet" />
</Arg>
</New>
</Arg>
<Call name="addServlet">
<Arg>org.mortbay.jetty.servlet.DefaultServlet</Arg>
<Arg>/</Arg>
</Call>
</New>
</Set>
</Configure>

View File

@@ -22,25 +22,21 @@ Configure a custom context for the eepsite.
* parameter value.
-->
<Configure class="org.mortbay.jetty.handler.ContextHandler">
<Configure class="org.mortbay.jetty.servlet.Context">
<Set name="contextPath">/cgi-bin</Set>
<Set name="resourceBase">./eepsite/cgi-bin/</Set>
<Set name="handler">
<New class="org.mortbay.jetty.servlet.ServletHandler" >
<Call name="addServletWithMapping">
<Call name="setInitParams">
<Arg>
<New class="org.mortbay.jetty.servlet.ServletHolder">
<Arg>
<New class="org.mortbay.servlet.CGI" />
<Map>
<Entry>
<Item>Path</Item>
<Item>/usr/local/bin:/bin:/usr/bin</Item>
</Entry>
</Map>
</Arg>
<Call name="setInitParameter">
<Arg>Path</Arg>
<Arg>/usr/local/bin:/bin:/usr/bin</Arg>
</Call>
</New>
</Arg>
<Call name="addServlet">
<Arg>org.mortbay.servlet.CGI</Arg>
<Arg>/</Arg>
</Call>
</New>
</Set>
</Configure>

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 8;
public final static long BUILD = 9;
/** for example "-test" */
public final static String EXTRA = "";