Unnamed patch
authoradam <adam@megacz.com>
Thu, 24 Mar 2005 07:41:39 +0000 (07:41 +0000)
committeradam <adam@megacz.com>
Thu, 24 Mar 2005 07:41:39 +0000 (07:41 +0000)
darcs-hash:20050324074139-5007d-9f5edca7cafa1a098475497641e9043b8097b1d1.gz

src/org/ibex/jetty/Jetty.java

index b5fa5fe..3fc4fc5 100644 (file)
@@ -30,7 +30,7 @@ public class Jetty {
             ClassLoader cc = Thread.currentThread().getContextClassLoader();
             Thread.currentThread().setContextClassLoader(Jetty.class.getClassLoader());
             sl.setHttpServer(hs);
-            addContexts(Root.root + "/host", null);
+            addContexts(org.ibex.jinetd.Main.ROOT + "/host", null);
             hs.start();
             Thread.currentThread().setContextClassLoader(cc);
         } catch (Exception e) { Log.error(Main.class, e); }
@@ -46,7 +46,9 @@ public class Jetty {
                 try {
                     InetAddress.getByName(host);
                     Log.info(Main.class, pad + host + " => " + path);
-                    WebApplicationContext context = hs.addWebApplication(host, "", path);
+                    WebApplicationContext context = new WebApplicationContext(path);
+                   context.setContextPath("");
+                    hs.addContext(host, context);
                     context.getServletHandler().getHttpContext().setParentClassLoader(Jetty.class.getClassLoader());
                     context.setClassLoaderJava2Compliant(true);
                     context.setClassLoader(new TreeClassLoader(webinf, Jetty.class.getClassLoader()));