diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-11 17:10:24 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-11 17:10:24 +0100 |
commit | b327982f49172604c38ca3ca7af28b49b3407102 (patch) | |
tree | 920f1135dabc22f4ac0e522462da12dc55a7dea2 /src/main/java/io/trygvis/appsh/booter/jetty/Main.java | |
parent | f8b2413778eefb52d01726a5b44b74ae196a4761 (diff) | |
download | app.sh-booter-jetty-b327982f49172604c38ca3ca7af28b49b3407102.tar.gz app.sh-booter-jetty-b327982f49172604c38ca3ca7af28b49b3407102.tar.bz2 app.sh-booter-jetty-b327982f49172604c38ca3ca7af28b49b3407102.tar.xz app.sh-booter-jetty-b327982f49172604c38ca3ca7af28b49b3407102.zip |
o New feature: Ability to run web apps from nested classpath (foo.jar!/my-webapp/WEB-INF/web.xml).
Diffstat (limited to 'src/main/java/io/trygvis/appsh/booter/jetty/Main.java')
-rwxr-xr-x[-rw-r--r--] | src/main/java/io/trygvis/appsh/booter/jetty/Main.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/io/trygvis/appsh/booter/jetty/Main.java b/src/main/java/io/trygvis/appsh/booter/jetty/Main.java index d3920c7..1f2c58f 100644..100755 --- 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)); + } } } |