tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Haraburda <>
Subject Tag Attributes and migrating from 3.1 to 3.2
Date Thu, 21 Dec 2000 00:51:08 GMT

I am looking into moving from Tomcat 3.1, to 3.2, and I am in the
process of testing things, and changing some stuff to make it work.
The problem I have is this:

I have a custom tag, with a property that is a java.lang.Object.  So I
have setAttr(Object obj) and getAttr() which returns an Object of

I am currently doing the following:

<foo:mytag attr="bar"/>

This works in Tomcat 3.1 as expected, the String object containing "bar"
is converted into a java.lang.Object.  However, in 3.2, I get the error
'cannot convert String to java.lang.Object for attribute attr'

I read about a similar problem in BugRat report #162  but couldn't
really find a clear-cut solution.  What should I do?  I'd prefer not to
have to go through all my code and do something like:

String str = new String("bar");
<foo:mytag attr="<%=str%>"/>

as that is kind of ugly.  I don't mind however, putting in some extra
work to do it the right way (tm).

Thanks for the help,


David Haraburda -
Everest - Helping You Manage Outsourcing
972-980-0013 x736

View raw message