XML parsing error

i'm using Tomcat 4.0 to test JSPs, and i have tried one with a tag library, but when i try to run the jsp, it says:

org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/jsp/test-taglib.tld: (line 10, col -1): Element "taglib" does not allow "tlibversion" here.

my XML taglib descriptor:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE taglib

PUBLIC"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"

"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

<taglib>

<tlibversion>1.0</tlibversion>

<jspversion>1.2</jspversion>

<tag>

<name>RndColors</name>

<tagclass>RndColors</tagclass>

<attribute>

<name>text</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

</tag>

</taglib>

what's its problem?

[1198 byte] By [theIndeed] at [2007-9-26 3:18:58]
# 1

Hi Thelndeed,

Here I am giving you the related information using Tomcat for your application .

Copy the tag library descriptor file to the /WEB-INF subdirectory of your web application.

Copy the tag library JAR file to the /WEB-INF/lib subdirectory of your web application.

Add a <taglib> element to your web application deployment descriptor in /WEB-INF/web.xml like this:

<taglib>

<taglib-uri>http://jakarta.apache.org/taglibs/application-1.0</taglib-uri>

<taglib-location>/WEB-INF/application.tld</taglib-location>

</taglib>

To use the tags from this library in your JSP pages, add the following directive at the top of each page:

<%@ taglib uri="http://jakarta.apache.org/taglibs/application-1.0" prefix="app" %>

where "app" is the tag name prefix you wish to use for tags from this library. You can change this value to any prefix you like.

When you use the <taglib> element in web.xml to specify the location of the TLD, the uri must be the same as you use in the taglib directive

(the recommendation is that it's a URL but it can be any symbolic name

you like) and the location must be the physical location of the TLD,

as a path relative to the context document base. With the info you have

provided, it should look like this:

<taglib>

<taglib-uri>/dlexpress/taglib</taglib-uri>

<taglib-location>/WEB-INF/tlds/taglib.tld</taglib-location>

</taglib>

Please look at this url also:

http://jakarta.apache.org/taglibs/doc/xsl-doc/index.html

I hope this will help you out.

Regards,

Tirumalarao

Developer Technical Support,

Sun Microsystems,India.

rao_indts at 2007-6-29 11:33:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...