tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Greene <>
Subject Tomcat can't find the web.xml file in its own directory
Date Wed, 24 Aug 2005 04:05:04 GMT
I am trying to get Tomcat 4.0.6 to work with Apache
2.0 runnning under Fedora Linux.

Tomcat was installed by my web host, which does not
seem to believe in the concepts of "documentation" or
"technical support for Tomcat," so I, a newbie, am
trying to work through configuring all the files to
get it to work right with Apache and my virtual site
directory. I guess I am doing some things right but...

When I start Tomcat (starting Tomcat first, then
Apache), I get the folloing error message: 
"ContextConfig[]: Missing application web.xml, using
defaults only." I've looked around with Google for
others who have had this problem, and as a result have
checked through the easy to correct causes of problems
Yes, I have the web.xml file in the WEB-INF directory.
Yes, the WEB-INF directory is named in caps.
Yes, the WEB-INF directory is at
Tomcat4/webapps/ROOT/WEB-INF (which as far as I can
tell is where it's supposed to be - Tomcat 4 is
This web.xml file was provided by the web host, and
presumably has the right headers in it:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN"

I wouldn't know if there is something wrong there, but
I assume that the web host knows what to put at the
top of a web.xml file.  Also all the <filter-mapping> 
<servlet> and other tags seem to be nested OK.

Another cause for problems that someone ran into (but
unfortunately didn't explain) was an error in the
server.xml file. As far as I can tell, that has the
right info in it, but there are a few places where I'm
not 100% sure I understand what the syntax is supposed
to be: 

<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Apache13">

     port="8009" address="somefournumberaddress"
minProcessors="5" maxProcessors="75"
     enableLookups="true" appBase="webapps"
     acceptCount="10" debug="0"/>

     name="Apache - Tomcat4" defaultHost="defaultHost"

      <Host name="defaultHost"
                <Context path="" docBase="" />
<Host name=""

className="org.apache.catalina.realm.MemoryRealm" />

<Context path=""
docBase="/home/virtual/site1/fst/var/www/html" />
In the first <host>...</host> section, the line is
literal - I use the word "defaultHost" there. 
The appBase and docBase are both where my (virtual)
site's own WEB-INF folder (with the /class, /lib, and
/jsp folders) is located.

For what it's worth, when Tomcat starts in with it's
default "web.xml" startup proceedure, it seems to know
where the site's webapp is, because it puts a bunch of
jar files in the /lib folder there. (shotly after
which it stops because of another error, but that's
another story - first things first). 

First of all, does anyone see anything (especially in
the server.xml file) that might be amiss?

If not, are there any other common reasons why Tomcat
might not be able to find the web.xml file in its own

-Robert Greene

Start your day with Yahoo! - make it your home page 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message