• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic