Bug 35707 - Reactivate path attribute for Context
Summary: Reactivate path attribute for Context
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.9
Hardware: Other other
: P4 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 18:49 UTC by Frederic Tregon
Modified: 2005-07-12 11:03 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.