Bug 35707

Summary: Reactivate path attribute for Context
Product: Tomcat 5 Reporter: Frederic Tregon <ftregon>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: P4    
Version: 5.5.9   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Frederic Tregon 2005-07-12 18:49:56 UTC
In Tomcat 4, when dropping an xml file in the webapps/ directory (or 
$CATALINA_HOME/conf/[enginename]/[hostname]/ in 5.5), the context path for the 
deployed application was taken from the "path" attribute of the "Context" 
element contained in the file.

In Tomcat 5.5, it is no longer the case as the context path is infered from the 
file name (cf. http://jakarta.apache.org/tomcat/tomcat-5.5-
doc/config/context.html)

I think it was a great feature allowing to switch webapps version quickly:
* I have a directory where I have multiple context xml files referencing 
different version of a single webapp: mywebapp-1.0.xml mywebapp-2.0.xml (they 
use the same context path, but *not* the same docBase)
* When I need to test a given version I just copy the associated xml file to 
the tomcat $CATALINA_HOME/webapps directory and the correct webapp version is 
used.

In Tomcat 5.5 the process is more difficult as I have to rename the file.

Another advantage is that I could name webapps related to each other with the 
same prefix (with no relation at all with the context paths).

Could it be possible to re-allow the "path" attribute to override the name 
infered from the file name?
Comment 1 Remy Maucherat 2005-07-12 18:54:00 UTC
No.
Comment 2 Frederic Tregon 2005-07-12 19:03:24 UTC
At least the answer is clear. First and last enhancement posted... I guess this 
is your goal anyway.