diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-03 17:11:10 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-03 17:11:10 +0100 |
commit | f8b2413778eefb52d01726a5b44b74ae196a4761 (patch) | |
tree | c0e39c124f6f456e37953299b63dacaa7bb0fd7b /src/main/java/io/trygvis | |
parent | 5166c8091f2395cb34b1a0cfe1171b92ad30b8aa (diff) | |
download | app.sh-booter-jetty-f8b2413778eefb52d01726a5b44b74ae196a4761.tar.gz app.sh-booter-jetty-f8b2413778eefb52d01726a5b44b74ae196a4761.tar.bz2 app.sh-booter-jetty-f8b2413778eefb52d01726a5b44b74ae196a4761.tar.xz app.sh-booter-jetty-f8b2413778eefb52d01726a5b44b74ae196a4761.zip |
o Removing file locking issue on Windows.
Diffstat (limited to 'src/main/java/io/trygvis')
-rw-r--r-- | src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java b/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java index 4783150..6a7b63a 100644 --- a/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java +++ b/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java @@ -93,6 +93,17 @@ public class JettyWebServer { public ContextHandler toJetty() { WebAppContext context = new WebAppContext(); + + /* + * By setting useFileMappedBuffer we prevent Jetty from memory-mapping the static resources + * + * The default servlet can be configured by setting parameters on the context in addition to the default + * servlet's init params, saving us from injecting the DefaultServlet programatically. + * + * http://stackoverflow.com/questions/184312/how-to-make-jetty-dynamically-load-static-pages + */ + context.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false"); + context.setContextPath(this.contextPath); context.setWar(webapp.getAbsolutePath()); if (extraClasspath != null) { |