tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: TagLibs in Tomcat4.0.1
Date Mon, 22 Oct 2001 17:11:05 GMT
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 <Jonathan_Pierce@seagram.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> 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*,filter-
> mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welco
> me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
> raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
>
>
>


Mime
View raw message