• 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
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

Reading from Map in jstl

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I'm searching for a solution to get the value (which is a list) from a java.util.map with a key.
I tried this option
<c:set var ="county" value="${specs.values.parameter.stateid}"/>
where 'parameter.stateid' is my key in the map and 'specs' is my map
and iterating thru the loop using
<c:forEach items="${county}"...

I'm not getting the list from my map using
<c:set var ="county" value="${specs.values.parameter.stateid}"/>

what i can do to resolve this??
 
Marshal
Posts: 26701
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I am not mistaken,I don't know why you have "values" in the middle of your EL expression, but if "specs" is a Map then the following two expressions are equivalent:In other words, something in your expression ("values" probably, or maybe "values.parameter.stateid"), is being treated as a literal rather than as property names.
 
Would you like to try a free sample? Today we are featuring tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic