You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Matthias Clauß <Ma...@gmx.de> on 2000/08/28 15:43:08 UTC
can't access JSP with TagLib: parse error
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>
Re: can't access JSP with TagLib: parse error
Posted by Kees Jongenburger <ke...@netlinq.nl>.
<%@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>
>
>