tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kees Jongenburger <ke...@netlinq.nl>
Subject Re: can't access JSP with TagLib: parse error
Date Mon, 28 Aug 2000 13:53:14 GMT
 <%@taglib uri="WEB-INF/tlds/MDG2.tld" prefix="mdg" %>
                ^^^^^^^^^^^^^^^^^^^^^

this is only a symbolic name 
so make i something like a unique (perhaps not existing URL)
after that you can edit your web.xml
to match the "fantasy url" with your real file)

so somehting like that.


<%@taglib uri="http://www.gmx.de/MDG" prefix="mdg" %>

and you web.xml file like this

<web-app>
    <taglib>
        <taglib-uri>
           http://www.gmx.de/MDG
        </taglib-uri>
        <taglib-location>
           /WEB-INF/tlds/MDG2.tld
        </taglib-location>
    </taglib>
</web-app>


bye

-- 
Kees Jongenburger             keesj@netlinq.nl

On Mon, 28 Aug 2000, Matthias Clau_ wrote:

> Hello,
> 
> I am getting
> 
>         org.apache.jasper.JasperException: Unable to open taglibrary
> WEB-INF/tlds/MDG2.tld : Parse Error in the tag library
>         descriptor: com.sun.xml.parser/V-036 web-app servlet
> 
> when I try to access my JSP. The syntax to introduce it in my JSP is:
>         <%@taglib uri="WEB-INF/tlds/MDG2.tld" prefix="mdg" %>
> 
> Thanx for any help,
> Matthias.
> 
> 
> My Taglib descriptor (MDG2.tld) looks like:
> 
> <?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>
>   <info>Tag library for MetaDirGenerator2 (MDG2) support</info>
> 
>   <tag>
>     <name>IfHasParent</name>
>     <tagclass>IfHasParentTag</tagclass>
>     <bodycontent>JSP</bodycontent>
>     <info>
>  Output the tag body only if the referenced parcel has a parent parcel.
>    If no reference if given, the default value from MDGConstants will be
> used.
>     </info>
> 
>     <attribute>
>       <name>ref</name>
>       <required>false</required>
>       <type>String</type>
>     </attribute>
>   </tag>
> </taglib>
> 
> 



Mime
View raw message