Thanks for your help, but I figured out the problem.
The problem was that I was explicitly declaring the type to be
java.util.TreeMap. Removing that solves the problem.
Regards,
Vikram
- Original Message -
From: Vinh Tran [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 11:03 PM
Subject: RE: ClassCastException - Using TreeMap
try this...
bean:define id=bookmarkID name=bookmark property=key/
-Original Message-
From: Vikram Goyal [mailto:tech;craftbits.com]
Sent: Thursday, November 14, 2002 7:52 AM
To: Struts Users Mailing List
Subject: ClassCastException - Using TreeMap
Hello All,
I am getting a ClassCastException when using a TreeMap in a logic iterate.
I
am reproducing part of the error below.
java.lang.ClassCastException: java.util.TreeMap$Entry
at
_web_22dinf._jsp._mycraft__jsp._jspService(/WEB-INF/jsp/mycraft.jsp:26)
I understand that while using a TreeMap, the values returned are part of
the
Inner class Entry. But why should this give me an error here?
My logic iterate looks like:
snip
logic:iterate id=bookmark name=user property=bookmarks
type=java.util.TreeMap
tr
td
bean:define id=bookmarkID name=bookmark
property=bookmark.key/
/snip
where user is the bean that contains a TreeMap property of bookmarks.
Any help appreciated.
Regards,
Vikram
--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org
--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org
--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org