> From: Bob DeRemer [mailto:[email protected]] 
> Subject: META-INF/Context.xml path question

> We're trying to determine if it's possible to build a WAR with an embedded 
> META-INF/Context.xml that defines the webapp path to be different then the 
> WAR file name.

Short answer: no.

> Let's say we have AppServer-<version>.war, but we want to access it as: 
> http://<host>/Server.

Just rename the .war file to Server.war as part of the deployment.  No muss, no 
fuss.

> We have reviewed the docs and the only approach that has worked for us is 
> adding a separate Context element to the <Tomcat>/conf/Server.xml file.

Along with the statement that putting <Context> elements in server.xml (not 
Server.xml) is strongly discouraged - don't do that.  You can keep the .war 
file outside of any <Host> appBase, and create an <appName>.xml file in 
conf/Catalina/[host] with a path attribute inside the <Context> element that 
points to the .war file.

 - 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to