jetty-9 cleanups for doco fetches

This commit is contained in:
Greg Wilkins 2012-11-02 14:27:33 +11:00
parent 52464a5ba6
commit bca34dd87b
2 changed files with 3 additions and 17 deletions

View File

@ -21,13 +21,6 @@ package org.eclipse.jetty.embedded;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
/* ------------------------------------------------------------ */
/**
* A {@link ContextHandler} provides a common environment for multiple Handlers,
* such as: URI context path, class loader, static resource base.
*
* Typically a ContextHandler is used only when multiple contexts are likely.
*/
public class OneContext
{
public static void main(String[] args) throws Exception
@ -38,10 +31,10 @@ public class OneContext
context.setContextPath("/");
context.setResourceBase(".");
context.setClassLoader(Thread.currentThread().getContextClassLoader());
server.setHandler(context);
context.setHandler(new HelloHandler());
server.setHandler(context);
server.start();
server.join();
}

View File

@ -1,13 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!--
Configure a custom context for the javadoc.
This context contains only a ServletHandler with a default servlet
to serve static html files and images.
-->
<!--Configure a context for the javadoc -->
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="contextPath">/javadoc</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/javadoc/</Set>
@ -21,6 +15,5 @@ to serve static html files and images.
<Set name="cacheControl">max-age=3600,public</Set>
</New>
</Set>
</Configure>