From b327982f49172604c38ca3ca7af28b49b3407102 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 11 Jan 2013 17:10:24 +0100 Subject: o New feature: Ability to run web apps from nested classpath (foo.jar!/my-webapp/WEB-INF/web.xml). --- src/main/java/io/trygvis/appsh/booter/jetty/Main.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/main/java/io/trygvis/appsh/booter/jetty/Main.java (limited to 'src/main/java/io/trygvis/appsh/booter/jetty/Main.java') diff --git a/src/main/java/io/trygvis/appsh/booter/jetty/Main.java b/src/main/java/io/trygvis/appsh/booter/jetty/Main.java old mode 100644 new mode 100755 index d3920c7..1f2c58f --- a/src/main/java/io/trygvis/appsh/booter/jetty/Main.java +++ b/src/main/java/io/trygvis/appsh/booter/jetty/Main.java @@ -35,6 +35,7 @@ public class Main { IO.close(is); } + // TODO: This should copy the output to the old std out until we have started if possible. setStreams(basedir, properties); JettyWebServer server; @@ -47,7 +48,18 @@ public class Main { String value = entry.getValue().toString(); if (key.startsWith("context.")) { - server.addContext(key.substring(8), new File(basedir, value)); + String contextPath = key.substring(8); + + if (value.startsWith("classpath:")) { + value = value.substring(10); + + File war = new File("wat"); + + server.addClasspathContext(contextPath, war, value); + } + else { + server.addContext(contextPath, new File(basedir, value)); + } } } -- cgit v1.2.3