aspose file tools*
The moose likes JSP and the fly likes [JSTL/EL] Dynamic key (String) to Map Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "[JSTL/EL] Dynamic key (String) to Map" Watch "[JSTL/EL] Dynamic key (String) to Map" New topic
Author

[JSTL/EL] Dynamic key (String) to Map

Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 509
Map<String,List<Object[]>> This map is passed to JSP.

I evaluate it in JSP like,


Now, above code does not get value for key from map map1. But if I change map key from String to Long, Map<Long,List<Object[]>> everything works fine.

After some googling I came across http://stackoverflow.com/questions/924451/jstl-access-a-map-value-by-key where it says, for example, 123456 evaluates to Long, but I eventough I have number I want it to be treated as String and I pass it as a String.

How can I do it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JSTL/EL] Dynamic key (String) to Map