tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: trying to make a custom jsp tag
Date Tue, 17 Oct 2000 17:40:46 GMT
"Harding, David" wrote:

> what does this error mean?  there are absolutely no servlet elements in my
> tld file! init-param? sounds like the error message refers to the web.xml
> file....what is going on?
>

You're right -- the problem *is* in your web.xml file.

What happens is that Tomcat 3.x does *not* validate your web.xml file against
the DTD when the server starts up (this is fixed in Tomcat 4.0), so invalid
XML data (in this case, elements out of order) are processed just fine.
However, when you use a custom tag library, the JSP compiler has to read
web.xml in order to look for <taglib> directives -- and it *does* turn on XML
validation!

The answer to your problem is to go back to your web.xml file and put things
in the order that is defined in the Servlet API Specification.  You can find
out what that order is by looking at the DTD file, or by downloading the spec
and reading the DTD there.

    http://java.sun.com/products/servlet/download.html

In Tomcat 4, the container will refuse to load your webapp in the first place
if there is an error in the web.xml file.

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Mime
View raw message