tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael W. Griffin" <mwgrif...@adelphia.net>
Subject non-String tag attributes
Date Sat, 27 Jan 2001 00:51:22 GMT
Hello,

I am new to JSP and have been trying to create a custom tag library.  I have been basically
successful with one exception.

I have created a custom tag with an attribute of type java.util.List.  My tag handler has
a setter for the attribute that takes a single argument of type java.util.List.

During page compilation, I encounter an error that indicates that a String cannot be converted
to a java.util.List for my attribute.

A snippet of the JSP is as follows:

<%

java.util.List myList = ....

%>

<myTags:listTag list="<%= myList %>">
<h1>body content</h1>
</myTags:listTag>

I have changed the type of the tag attribute from java.util.List to String (I changed the
method signature on the tag handler) out of curiosity.  When I did this the value that is
passed to the setter is literally <%= myList %>.

Any help would be greatly appreciated.

Thanks,
Michael


Mime
View raw message