Robert Dietrick wrote:
> I would very much prefer to use only the one in
> mywebapp/META-INF/contex.xml, as this is much less invasive (does not
> require changing/adding anything to tomcat's global config
> directories).  But this doesn't seem to work.

That isn't the way it is designed.
> 
> I can leave it as is (and am becoming resigned to the fact that this
> is my only option), but this is sort of a maintenance nightmare since
> the two files need to be kept in sync.  Plus, it just seems idiotic to
> need to declare the context and its resources in two locations.

The way it works (ignoring
https://issues.apache.org/bugzilla/show_bug.cgi?id=42747) is:

- drop in war
- if META-INF/context.xml exists, it is copied to conf
- the version in conf then always takes priority
- edit version in conf if you need to change the config
- war automatically reloads
- drop in new war
- war automatically reloads
- any META-INF/context.xml is ignored
- undeploy war, file in conf is deleted.

The reason it is designed this was is so that you can edit context.xml to
non-default settings without them getting trashed every time you update the
war.

> Does either of these files need a 'docBase' or 'path' parameter?  It
> doesn't seem to make a difference either way.

No. They should be ignored if present but it is better not to specify them.
The name of the war determines the context path.

Mark



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