Situation:
I changed my manual release/deploy on a private project to using Continuous Delivery with jenkins. I wanted to change the format of my naming convention on my files from webapp.war to webapp-0.9.1.war so I could easily see what was deployed. Default Tomcat deploys an application with it’s whole name as resource locator and that of course was not good enough for me.

Solution
You can do autodeploy in Tomcat with a different name than the context path by adding a context.xml inside your META-INF catalogue inside the war file, which contains the context path like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<Context path=”/your_url”>
 </Context>
The problem is that Tomcat does not copy the XML by default to $TOMCAT_HOME/conf/Catalina/localhost/ so you need to make tomcat do it by adding:
copyXML=”true” 
to Host config inside $TOMCAT_HOME/conf/server.xm like this:
<Host name=”localhost”  appBase=”webapps” unpackWARs=”true” autoDeploy=”true” copyXML=”true”>
Now you should be able to deploy e.g. a file called webapp-0.9.1 or whatever without renaming the file and make it bind to /your_url.
The downside
If you change anything in the context file and redeploy the application the configuration will be overwritten by the new artifact. If this is not a problem for you, then go ahead and use the copyXML 🙂