tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Context placement question
Date Wed, 10 Dec 2008 18:38:46 GMT
> From: János Löbb [mailto:janos.lobb@yale.edu]
> Subject: Context placement question
>
> The default context.xml in the conf directory - $CATALINA_BASE/conf/
> context.xml -, starts up the StandardContext by default

No - it merely adds attribute values for *all* <Context> elements, even for webapps
that have their own.  A webapp *may* override the attribute values in conf/context.xml, but
if it doesn't do so explicitly, the ones in conf/context.xml apply in addition to any attributes
the one from the webapp specifies.

> can I have ReplicatedContext for individual webapps
> that I want to run on the cluster?

Yes, but that's completely independent of conf/context.xml, *unless* you modify that to include
a className attribute.

> 2.  If the answer is yes for the first question then what is the best
> place to put the
> <Context path="" docBase="ROOT"
> className="org.apache.catalina.ha.context.ReplicatedContext">
> element ?

Normally, the best place is to keep it with the webapp: ROOT/META-INF/context.xml; alternatively,
you may place it in conf/Catalina/[host]/ROOT.xml.  In either case, the path and docBase attributes
must not be set.  You would normally use the latter location only if you want to package your
webapp for distribution and be able to set (e.g., a database resource) attributes without
modifying anything inside the package.

> My major concern is that modification to the webapps context. xml or
> webapp.xml containing context info, should not interfere with the
> running of other webapps in production environment.

It won't, if you do what's described above.

 - 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


Mime
View raw message