File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Saurabh Pillai
Ranch Hand
Posts: 524
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic