wood burning stoves 2.0*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 498
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
 
Similar Threads
Tomcat , Unable to compile classfile, pls help
JSF TreeMap Iteration Problem Using JSTL In XHTML
JSTL and Results
Iterating over Map using JSTL
showing values in table on basis of column header