jQuery in Action, 2nd edition
The moose likes JSP and the fly likes Iterating a HashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Iterating a HashMap" Watch "Iterating a HashMap" New topic
Author

Iterating a HashMap

Khsitiz sharma
Greenhorn

Joined: Jun 03, 2008
Posts: 7
hi all

can any one tell me how to iterate over a HashMap which is declared as
Map<Person,Integer> pHashMap=new HashMap<Person,Integer>();
Here Person is an entity and contains Name, address and age attribute.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

JSTL's c:forEach tag can iterate over such a structure.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Iterating a HashMap
 
Similar Threads
how to iterate a hashmap with key hashmap
bad using method get()
Hash Maps
Problem with hash map
Iterating through HashMap of HashMaps