tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duane Morse <>
Subject RE: Error parsing JSP with tag library -- how do I track down wha t's wrong?
Date Tue, 28 Nov 2000 22:54:07 GMT
Thanks again for taking the time to respond to my problem.  I DID put your
definition at the beginning of the file.  To save time, attached is the
current web.xml
that seems to be satisfactory except for the taglib portion.

Duane Morse, Eldorado Computing Inc., Phoenix AZ

-----Original Message-----
From: Craig R. McClanahan []
Sent: Tuesday, November 28, 2000 3:47 PM
Subject: Re: Error parsing JSP with tag library -- how do I track down
what's wrong?

Duane Morse wrote:

> Thanks for the suggestion, but it didn't help.  I didn't have a DOCTYPE
> definition
> in web.xml at all, but Tomcat was able to process the file regardless.
> Adding the definition
> didn't change the error when I tried to run a JSP which used a tag
> extension.  (I can
> run JSPs which don't use tag extensions, however.)

Short answer:  the problem is that your web.xml does not conform to the
requirements of the DTD for web application deployment descriptors (as
in the Servlet API Specification, version 2.2).

The obvious retort:  "Why didn't Tomcat tell me that in the *first* place?"

The answer is that Tomcat 3.1 does not use a validating XML parser when they
first process the web.xml file at server startup time.  Thus, your
will start up and appear to run normally -- *until* you use a JSP page with
custom tag in it.

What happens then is that the JSP compiler servlet re-parses the web.xml
again, but this time a validating parser is used; and the problem in web.xml
(which is usually an element out of order) is encountered.

The bottom line:  the DOCTYPE entry for web-app that was suggested below
to go at the top of your web.xml file, and you need to ensure that all of
elements of your web.xml file conform to the rules that are described in

> Duane Morse, Eldorado Computing Inc., Phoenix AZ

Craig McClanahan

View raw message