tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duane Morse <dmo...@eldocomp.com>
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
DOCTYPE
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 [mailto:Craig.McClanahan@eng.sun.com]
Sent: Tuesday, November 28, 2000 3:47 PM
To: tomcat-user@jakarta.apache.org
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
defined
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
application
will start up and appear to run normally -- *until* you use a JSP page with
a
custom tag in it.

What happens then is that the JSP compiler servlet re-parses the web.xml
file
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
needs
to go at the top of your web.xml file, and you need to ensure that all of
the
elements of your web.xml file conform to the rules that are described in
this
DTD.

>
> Duane Morse, Eldorado Computing Inc., Phoenix AZ
>

Craig McClanahan



Mime
View raw message