tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trenton D. Adams" <>
Subject RE: No such tag error
Date Fri, 31 May 2002 04:58:34 GMT
I was able to start to get it fixed by doing <%@ page language="java"
contentType="text/html" import="ListMessagesTag" %> tags as suggested by
Phillip Morelock, but I would really like to know how to do it with a
jtl.jar class library without the above tags.  It seemed to work in the
jtl.jar as long as I had the above tag in all the right places in the
JSP sources.

It seems to me that the problem lies with the system not accessing the
taglib.tld file in the jtl.jar properly, or it being incorrect or
something like that, but I'm not sure.

Would you mind sending me the webapp from the demo with the
modifications as you suggested?  That might help me understand why the
problem is happening and come up with a solution that works with the
jtl.jar, and without the "page import" tags.

Thanks for the help!

-----Original Message-----
From: Rick Fincher [] 
Sent: May 30, 2002 9:32 PM
To: Tomcat Users List
Subject: Re: No such tag error

The problem is that in messagecontent.jsp and messageheaders.jsp they
are using the javamail tag to set msginfo then later they are directly
accessing methods of msginfo in java scripts.  This requires that the
classes messageInfo and attachmentInfo have to be imported in
messagecontent.jsp and messageheaders.jsp, maybe others, even though
importing isn't needed for the tags.

This is very bizarre.  I ended up putting all the jtl.jar sources in a
package in WEB-INF/classes and modifying the tld file (just added the
new package name to the <tag-class> and <tei-class> entries), added the
package name to the java files to package them up, stuck the modified
taglib.tld in a tld directory in WEB-INF (I renamed it too, though that
isn't required), then modified the taglib entry in web.xml to point at
the moved, modified, and renamed tld file.

Essentially, this was just pulling the jar apart and accessing it in
non-jar format.  This compiled in Forte for Java 4.0ea. and ran in
Tomcat 4.0.3.

----- Original Message -----

> This message is related to "STATUS 500 - Unable to compile class for 
> JSPNote" a little bit.
> I get the error...
> org.apache.jasper.JasperException: No such tag listmessages in the tag

> library imported with prefix javamail
> Now, here's the details I believe you need.
> Jtl.jar is in the WEB-INF/lib directory
> I do this in my JSP
> <%@ taglib uri="lib/jtl.jar" prefix="javamail" %>
> Then, of course I try and use the "listmessages" tag later in the JSP 
> page.
> Below is a chopped down version of taglib.tld. ------------------BEGIN

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

> ?> <!DOCTYPE taglib
>         PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
>         "">
> <taglib>
>   <tlibversion>1.0</tlibversion>
>   <jspversion>1.2</jspversion>
>   <shortname>javamail</shortname>
>   <uri>lib/jtl.jar</uri>
>   <tag>
>     <name>listmessages</name>
>     <tagclass>ListMessagesTag</tagclass>
>     <teiclass>ListMessagesTEI</teiclass>
>     <bodycontent>JSP</bodycontent>
>     <info>
>         A listmessages tag
>     </info>
>     <attribute>
>       <name>id</name>
>       <required>true</required>
>       <rtexprvalue>true</rtexprvalue>
>     </attribute>
>     <attribute>
>       <name>folder</name>
>       <required>false</required>
>       <rtexprvalue>true</rtexprvalue>
>     </attribute>
>     <attribute>
>       <name>session</name>
>       <required>false</required>
>       <rtexprvalue>true</rtexprvalue>
>     </attribute>
>   </tag>
> </taglib>
> -------------------END taglib.tld-------------------
> Any thing wrong with it?  Looks good to me according to the JSP 1.2
> specs.
> Now, the jtl.jar file in WEB-INF/lib/jtl.jar does have all the classes

> in it along with the taglib.tld
> I also tried adding...
>   <taglib>
>     <taglib-uri>/javamail</taglib-uri>
>     <taglib-location>lib/jtl.jar</taglib-location>
>   </taglib>
> but from what I understand, it's not required because I've got 
> everything where it's supposed to be in the jtl.jar
> Is there something wrong with this stuff???

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message