I have a HashMap that when I store it to the Session, and ask EL to display it, it works great.
Thus ${yearlycits} converts to this:
{1989=[4799156_1989-01-17], 1998=[5715314_1998-02-03, 5724424_1998-03-03], 1999=[5960411_1999-09-28, 5987140_1999-11-16]}
As you can see, the keys are Long, and the value is a list of
String. You can notice, if you look closely, that the keys are not consecutive, they are really just
{1989, 1998, 1999}
What I want to do is get the keySet so I can then do a for-loop for each key value, get the list of Strings, and process them.
${yearlycits.keySet}
the view .jsp blows up:
org.apache.jasper.JasperException: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
What am I doing wrong? I think I'm approaching it incorrectly.
Thanks
Pat