> From: Rose, Greg [mailto:[EMAIL PROTECTED] 
> Subject: docBase error on Tomcat 5.5.12
> 
> I did this by creating a context.xml file with the 
> information and placed it in the
> {tomcat base dir}\conf\Catalina\localhost directory.
> The context entry is:
> <Context path="/SVOIC" docBase="SVOIC"
>         debug="5" reloadable="true" crossContext="true">

Three things wrong:

1) The name of the file containing the <Context> tag must be
<app_name>.xml, not context.xml (context.xml is used when it's under the
META-INF directory).

2) The path attribute is not allowed, unless the <Context> tag appears
in server.xml, which is strongly discouraged.  The path to the app is
determined by the name of the .xml file containing the <Context> tag.

3) By having an entry in conf/Catalina/localhost that points to an
application under the webapps directory, you run the risk of deploying
the application twice.  If your app is under webapps, then it's better
to place the <Context> tag in a context.xml file under the app's
META-INF directory.  Use the alternate location only if the app is not
under webapps.  (This also makes the app easier to deploy across
multiple systems, since the information is now packaged in the .war
file.)

> I left the default context.xml file in the {tomcat base 
> dir}\conf directory unchanged.

That file merely provides defaults for all webapps.

> Every now and then, I get the following error when I start Tomcat: 

5.5.12 enforces the naming rules more strictly, although still not
perfectly.  

> And then the final error message:
> Document base C:\Tomcat 5.5\webapps\context does not exist or 
> is not a readable directory

This is because the <Context> tag is in a file named context.xml, so
it's trying to deploy an app under the name "context".

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to