Author
JSTL and hashmap
Alex Florentino
Ranch Hand
Joined: Dec 12, 2006
Posts: 48
Hi all, I have HashMap with dynamic key, sample: but I get an error when I try run this jsp. I think that problem is: when I get my hashmap value with my dynamic key. resume: how I get my hashmap value when I create my key dynamic . very thanks
Sid Murrey
Ranch Hand
Joined: Jul 07, 2008
Posts: 58
This could be completely wrong, but a guess: [ July 10, 2008: Message edited by: Cedric Meury ]
Alex Florentino
Ranch Hand
Joined: Dec 12, 2006
Posts: 48
it is not working, but working
Sid Murrey
Ranch Hand
Joined: Jul 07, 2008
Posts: 58
Nice! Good to know.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56221
The ${} surrounds the entire EL expression. It is not some sort of "fetch" operator.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Alex Florentino
Ranch Hand
Joined: Dec 12, 2006
Posts: 48
Originally posted by Bear Bibeault: The ${} surrounds the entire EL expression. It is not some sort of "fetch" operator.
I my sorry, but I not understand ? because ${myhash[myinternalvar]} works. thanks.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56221
Because in that example, the ${} surrounds the entire El expressions as I stated.
John Abrams
Greenhorn
Joined: Sep 14, 2008
Posts: 1
posted Sep 14, 2008 15:47:00
0
This is about as straight forward as it gets: <table> <c:forEach items="${requestScope.mapToIterate}" var="entry"> <tr><td>${entry.key}</td><td>${entry.value}</td></tr> </c:forEach> </table>
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56221
"gguer gguer", please check your private messages for an important administrative matter.
subject: JSTL and hashmap