I should add, I am using TC 5.0.28. When I remove all those entries, my
context file now says;

<Context crossContext="true" privileged="true" >

But, when I deploy it with tomcat manager, I get this error.

FAIL - Encountered exception java.io.IOException:
java.lang.IllegalArgumentException: Context path is required

-----Original Message-----
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 4:09 PM
To: Tomcat Users List
Subject: RE: Manager deploy uploaded war - doesn't use the
/WEB-INF/context.xml

> From: Michael Hencin [mailto:[EMAIL PROTECTED] 
> Subject: RE: Manager deploy uploaded war - doesn't use the 
> /WEB-INF/context.xml
> 
> I know I can leave the path out of my META-INF/context.xml file,

Not just can, but *must*.  The same applies to the docBase attribute -
it's only pertinent when your <Context> element is in some place other
than META-INF/context.xml.  The presence of inappropriate attributes may
lead to inappropriate behavior.

> In my original war file I have a context file with;
> 
> <Context crossContext="true" docBase="mywebapp" path="/mywebapp"
> privileged="true" workDir="work\Catalina\localhost\mywebapp">

Both the docBase and path attributes should be removed.  Also, you don't
really need workDir, since Tomcat will provide one for you the value of
which you can retrieve from the ServletContext.

> Is there some way I can "varibalize" the end of those to 
> match the war file name?

Mostly just by removing them.

> So what I would like is have a context file that will 
> put the proper entires into the context element, based
> on the war file name.

If you just remove the unnecessary attributes from the <Context>
element, I think you'll have achieved that goal.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to