Unnamed patch
[org.ibex.jetty.git] / 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()));