I\'m using Tomcat 7 and would like to set the context root of a war file in the war file itself and have Tomcat autodeploy and pick up this path. I thought I found the way to
If you load your application.war to a directory Tomcat isn't aware of, how can it read anything in your war file? The correct place to add this information is in $TOMCAT_HOME/conf/context.xml - this is part of Tomcat and Tomcat can read this file and find out where your application is and deploy it. There's more on how to set up JNDI in Tomcat