tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred R." <frahman...@sourcetechcorp.com>
Subject problem using custom tags
Date Fri, 05 May 2000 15:56:58 GMT
Hi,

I've developed a sample custom tag library and I'm trying to deploy it
on tomcat. But tomcat doesn't seem to be able to find the tld file. I
get the error :

Unable to open taglibrary
http://www.someurl.com/sampletags/sampletags-taglib : Parse Error in the
tag library descriptor: Element type "WEB-APP" is not declared.

Here is how I set things up:

web.xml for a sample app contains:
<WEB-APP>
   <TAGLIB>

<TAGLIB-URI>http://www.someurl.com/sampletags/sampletags-taglib</TAGLIB-URI>


<TAGLIB-LOCATION>/WEB-INF/tlds/sampletags-taglib.tld</TAGLIB-LOCATION>
   </TAGLIB>
    .
    .
    .
<WEB-APP>

the jsp page has this directive:
<%@ taglib uri="http://www.someurl.com/sampletags/sampletags-taglib"
prefix="st" %>


this is the content of the sampletags-taglib.tld and this file is in
WEB-INF\tlds
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
 "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

<taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>st</shortname>
    <info>A Sample Tag library</info>
    <urn></urn>
    <tag>
        <name>ACustomTag</name>
        <tagclass>sampletags.ACustomTag</tagclass>
        <bodycontent>empty</bodycontent>
        <info>A Tag to do  something</info>
        <attribute>
           <name>displayFormat</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
        </attribute>
    </tag>
</taglib>


TIA,

--
Fred R


Mime
View raw message