Tomcat context path via META-INF/context.xml
843841Nov 14 2006 — edited Apr 8 2008Am incorrectly assuming the use of a context.xml file located withing a war file's META-INF directory for deployment within Tomcat 5.5?
I currently have an extremely simple context.xml file in my war (foo-1.0.war), containing the following:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/foo" />
I was under the impression that when deployed within tomcat, my context path would be set as "/foo". The issue I am having is that the context is still the deployed WAR file's name (/foo-1.0).
I am looking for the easiest path for our operations people to handle deployment. So, I thought I would toss a context.xml file in there (foo-1.0.war#/META-INF/context.xml) and call it a day. I see that the file actually gets extracted and placed into the ${catalina.home}/conf/Catalina/localhost directory, with the name "foo-1.0.xml" (which is where I can see how Tomcat is getting the context name). The contents of the file are exactly what is in the original context.xml file.
So, am I missing a step? Is there another configuration I need to set up to get these context files to be able to declare the context path (wow, that is a lot of "to")?
Thanks,
Briggs.