> From: James Hoare [mailto:James.Hoare@net-a-porter.com]
> Subject: Setting a Different context path to webapp name
>
> I have a webapp called myApp.war but I would like to
> set this to a different url path than the webapp name.
The easiest thing to do is just rename the .war file, but if you insist on doing things the
hard way:
1) Do not put the .war file in the <Host> appBase directory - keep it somewhere else.
2) Create a file named newurlname.xml in conf/Catalina/[host] containing a <Context>
element.
3) Set the docBase attribute of the above <Context> element to point to the *absolute*
path to the .war file.
> I've seen in the docs that you can specify an xml file under
> Catalina_Home/Catalina/localhost/newurlname.xml.
What docs were those? They left out a critical component of the path (at least for a real
Tomcat installation).
> in my xml file I just have a <Context></Context> definition
An empty <Context> element is never needed.
- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|