Thanks Craig...

I figured it out after I sent the message to the list. I should have realized
that the XML elements needed to be in a specific order. I didn't see an example
taglib in the /conf/web.xml so it wasn't obvious to me at first.

Jonathan

____________________Reply Separator____________________
Subject:    Re: TagLibs in Tomcat4.0.1
Author: [EMAIL PROTECTED]
Date:       10/22/2001 10:11 AM

This error is coming from the XML parser when reading your web.xml file.
It means that you have your elements out of order.  The required order is
listed after the "must match" part (i.e. <icon> must be first if it is
present, then <display-name>, and so on).

You didn't show your entire web.xml, but you definitely cannot put
<taglib> directives ahead of things like <servlet> or <servlet-mapping>.

Craig

On Mon, 22 Oct 2001, Jonathan Pierce wrote:

> Date: Mon, 22 Oct 2001 12:55:35 -0400
> From: Jonathan Pierce <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: TagLibs in Tomcat4.0.1
>
> I'm trying to use tag libraries for the first time in Tomcat 4.0.1. I thought
> I'd try the io taglib first. I followed the instructions, and added the taglib
> element to the examples/WEB-INF/web.xml file as described in the
documentation,
> but I'm getting a SAX parse error that I don't understand since the xml looks
> correct to me.
>
> The DTD looks correct, and the tag being complained about looks valid to me.
> What am I doing wrong here?
>
> My Tomcat4.0.1 \webapps\examples\WEB-INF\web.xml contains the following:
>
> <?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>
>
>     <taglib>
>         <taglib-uri>http://jakarta.apache.org/taglibs/io-1.0</taglib-uri>
>         <taglib-location>/WEB-INF/io.tld</taglib-location>
>     </taglib>
>
> ...
>
> </webapp>
>
> The error message I get is below: The taglib tag is mentioned in the error so
I
> don't understand what is wrong.
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> PARSE error at line 284 column 11
> org.xml.sax.SAXParseException: The content of element type "web-app" must
match
> "(icon?,display-name?,description?,distributable?,context-param*,filter*,filte
r-
> mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,wel
co
> me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-con
st
> raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
>
>
>

Reply via email to