Frances Del Rio <fdr58@yahoo.com> said:
>my tomcat is broken now, as of last night
...
>INFO: Missing application web.xml, using defaults only
'application web.xml' would mean WEB-INF/web.xml for a single
application -- and I think you mentioned removing web.xml in
another of your posts (where you wondered about the path to
invoke a servlet). So, could that still be missing?
>StandardHost[localhost].StandardContext[/cc]
And this might mean (no, Tomcat error messages definitely are not the
top in readability) that the WEB-INF/web.xml is missing from an
application whose application base directory is named 'cc'.
>'Missing application web.xml'? I don't understand, it's there,
>everything still there where it should be..
The other possibility might be that the application web.xml is not
completely valid (f.ex. elements not in correct order); I seem to
recall spending quite some time resolving an issue with an application
web.xml file just to find out that the order of different elements
within the file is critical. Also, I seem to recall having seen a case
where Tomcat just wouldn't load an application that didn't have the
application web.xml file.
Here's a very minimal web.xml file:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
</web-app>
-----
No servlet mappings, no nothing. But this is enough to allow running
JSP pages and serving static resources (HTML, images). For servlets,
add the appropriate mappings:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<servlet>
<servlet-name>JustANameForTheseMappings</servlet-name>
<servlet-class>package.Class</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JustANameForTheseMappings</servlet-name>
<url-pattern>/serv/let/url</url-pattern>
</servlet-mapping>
</web-app>
-----
Note on the above: If you have multiple servlet classes in a single
application, you must first write _all_ the <servlet> -elements, and
only after all the <servlet> -elements, write the corresponding
<servlet-mapping> -elements. You cannot interleave the two. Also, if
you have any other elements than those listed above, find out the
correct place for them.

Signature
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)