> From: Yaakov Chaikin [mailto:yaakov.chai...@gmail.com]
> Subject: Re: Changing default context path
> 
> So, is it telling me that I can place bla.xml into META-INF 
> directory with a <Context/> tag in it and the context path
> will change to /bla? I tried that and it didn't work.

No, when inside the webapp, the <Context> element must be in 
META-INF/context.xml.

> So, are you saying that there is NO way (outside of configuring a
> <Context...> inside the server.xml) to have the name of the WAR file
> be one thing and the context path be something else?

You can keep the webapp outside of the <Host> appBase directory (Tomcat's 
webapps directory, by default), and place the <Context> element for it in 
conf/Catalina/[host]/[appName].xml, with a docBase attribute pointing to the 
actual location of the .war file (or directory).  You still do not use the path 
attribute; the URL path to the webapp is determined by the name of the .xml 
file.

> I am looking for a way to carry the context path information 
> inside the WAR itself due to my build process requirements.

You could easily have your deployment script change the name of the .war file 
when it's copied to the appBase directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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

Reply via email to