How to set the path of web app in META-INF/context.xml in Jetty?
I know how to do it in Tomcat configuratio开发者_C百科n but how to do the same in Jetty server?
Are you using maven to deploy? Set contextPath
in your pom (http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin#MavenJettyPlugin-WebappConfiguration). Similar process for ant.
I'd advise against trying to bake the path into your WAR file. Configure your run time as you deploy it. That way you don't need to recompile a new WAR just to deploy into a different context path (e.g. testing vs staging vs production).
精彩评论