tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angelov, Rossen" <>
Subject RE: How set a default context
Date Tue, 26 Sep 2006 19:29:40 GMT
What I wrote was extracted from the same doc, the URL you pasted in your response.

"You may define as many Context elements as you wish. Each such Context MUST have a unique
context path, which is defined by the path attribute. In addition, you MUST define a Context
with a context path equal to a zero-length string. This Context becomes the default  web application
for this virtual host, and is used to process all requests that do not match any other Context's
context path."

-----Original Message-----
From: Caldarale, Charles R []
Sent: Tuesday, September 26, 2006 2:15 PM
To: Tomcat Users List
Subject: RE: How set a default context

> From: Angelov, Rossen [] 
> Subject: RE: How set a default context
> - a Context that has an empty PATH attribute will become the 
> default web application for the virtual host. This definitely
> works on Tomcat 5.5

Definitely not true.  Read the doc:

which states:

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place <Context> elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above."


"The value of this field [path] must not be set except when statically
defining a Context in server.xml, as it will be infered [sic] from the
filenames used for either the .xml context file or the docBase."

> - DefaultContext element in the Host is the other way to define a
> default context, but this may work only on Tomcat 5.0

The DefaultContext element only specified the set of attributes common
to all contexts; it did not specify what the default application was.
DefaultContext was replaced by the conf/context.xml file quite some time

 - Chuck

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:
To unsubscribe, e-mail:
For additional commands, e-mail:

"This communication is intended solely for the addressee and is confidential and not for third
party unauthorized distribution"

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message