tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Adams <>
Subject Taglibs & Jasper CompileException
Date Mon, 01 Oct 2001 22:32:14 GMT
I am getting a weird exception message when I try to use a taglib.  I
hope somebody reading this forum can enlighten me.  This is my first
foray into using taglibs.

I have a JSP which has the following lines of code in place to use my

    <%@ taglib uri="/WEB-INF/errorMessages-taglib.tld"
               prefix="errorMessages" %>

      <errorMessages:message key="all" />

I have the taglib descriptor file under the web application's WEB-INF
directory named errorMessages-taglib.tld and it looks like this:

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

<!DOCTYPE taglib
  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"


  <info>A tag library to display error messages</info>

    <info>Outputs an error message corresponding to the key provided, if


I have included a <taglib> entry in my web.xml which looks like:



Unfortunately I am getting a Jasper compile exception when I attempt to
load the page, telling me that it can't open the tld and that I need to
terminate a "description" element, even though there is no "description"
element in the tld (included above).  Below is the exception I get:

Internal Servlet Error:
/var/tomcat/webapps/dataview/Select.jsp(8,4) Unable to open taglibrary
/WEB-INF/errorMessages-taglib.tld : Parse Error in the tag library
descriptor: Next character must be ">" terminating element


at org.apache.jasper.compiler.Parser$Directive.accept(
at org.apache.jasper.compiler.Parser.parse(
at org.apache.jasper.compiler.Parser.parse(
at org.apache.jasper.compiler.Parser.parse(
at org.apache.jasper.compiler.Compiler.compile(
at org.apache.jasper.servlet.JspServlet.doLoadJSP(
at org.apache.jasper.servlet.JasperLoader12.loadJSP(


Can anybody see what it is that I'm doing wrong ?  I thought that I had
followed the examples in the references I've looked at but obviously
something's not working as advertised.  However the exception message
doesn't make any sense in the context (though this is unfortunately
typical of most exception messages), and there is nothing which I can
see which relates to my tag library descriptor, so I am thinking that
perhaps this exception is happening someplace else.  In any event I'm
clueless as to how I might proceed, I've tried several different
approaches (moving the tld to a different directory, using a different
or no <taglib> in web.xml, etc.) but with no luck at all.

Thanks in advance for any suggestions or solutions.


View raw message