On Thu, Aug 14, 2008 at 11:52 AM, Caldarale, Charles R
<[EMAIL PROTECTED]> wrote:
>> From: Robert Dietrick [mailto:[EMAIL PROTECTED]
>> Subject: Re: where to place context configuration
>>
>> I would very much prefer to use only the one in
>> mywebapp/META-INF/contex.xml
>
> I hope the above is a typo, because if it's really in "contex.xml" Tomcat 
> won't look at it.

Yes, it was a typo.

>
>> But this doesn't seem to work.
>
> It works fine for me; I put the <Context> element in one location or the 
> other, not both.  Note that Tomcat will sometimes copy the one from 
> META-INF/context.xml into conf/Catalina/[host]/[appName].xml during a 
> deployment, and that's likely what you're seeing.
>
>> Plus, it just seems idiotic to need to declare the context
>> and its resources in two locations.
>
> Never had to do that.  Suggest that you stop Tomcat, remove the one in 
> conf/Catalina/[host], clean out the work directory for the webapp, clean out 
> the expanded webapp so all you have left is the .war file, and restart 
> Tomcat.  You will likely see the one in conf/Catalina/[host] recreated from 
> the META-INF/context.xml, since Tomcat wants to be able to read the file 
> directly.  A real undeployment of the webapp should delete the one in 
> conf/Catalina/[host]; if you're updating the .war without doing an 
> undeployment first, you're breaking the rules, and all bets are off.

That did it.  I've never seen it documented anywhere that tomcat
copies context files from META-INF/ to /conf/[Engine]/[host]/.  Plus,
I was deploying as a directory named '[myapp].war' rather than as an
actual .war file, so I guess I get what I deserve.

Thanks for the help.

-rob

---------------------------------------------------------------------
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