Hi Jan
What I am trying to achieve is to easily start building new applications with embedded Jetty without having to use external programs (like jetty-runner), XML files (like context XML) or frameworks (like DropWizard). I can copy and paste this main class, but I would rather avoid the magic parts so it doesn't require special knowledge (especially the trick with setting the init parameter).
I am indeed running on Windows (is that the only platform that supports fileMappedBuffers)? Setting the init-parameter like this actually does work (I use it every day) and requires less code than what's needed to have a custom context XML. But like I said: It's undocumented and a bit magic.
I am still trying to figure out what change I would like to see in Jetty for this.
I agree that in this case, the src/main/resources/webapp path is specific to the way this application is packaged and something that makes sense to configure.
I guess that ideally for me would be if the default value of fileMappedBuffers would depend on whether the value in setWar is a directory or a JAR file. Does this distinction make sense to you?
~Johannes