On 18/02/2016 10:42, Romain Manni-Bucau wrote:
> Hi guys,
> 
> <Context path="/override" /> in <war>/META-INF/context.xml was used a lot
> for tomcat 6/7 and doesn't work anymore since tomcat 8 (didn't check if it
> has been backported, can be).
> 
> It is documented but I don't get why this feature has been removed.
> typically checking if path is null or not before setting ContextName would
> be enough to  keep the feature working.
> 
> Do I miss anything?

Yes. Consider the following:

test1.war with META-INF/context.xml containing <Context path="/test2" />
test2.war with no context.xml

Put them both in the appBase of a default, running Tomcat instance. What
happens?

If you want to change the path, either:
- change the name of the WAR
or
- locate it outside the appBase and put a context.xml file in
conf/<engine>/<host>

The only place path is used is if the Context is defined in server.xml
and defining contexts in server.xml is strongly discouraged.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to