Link to home
Start Free TrialLog in
Avatar of pradeep_brat
pradeep_brat

asked on

How to Iterate a MAP in JSP in Struts2 framework.

Hi all,

How to Iterate a MAP in JSP in Struts2 framework. My  map looks like ths Map<QuestionObject,List<Answer>>

NOTE:QuestionObject is a serializable object with setter and getters. Which acts as the Key. In that suppose "id" is the important field used to distinguish two QuestionObject using compartor.
i want to display like this
KEY           Value
1                 List<Answer>
2                List<Answer> ...............



Avatar of krakatoa
krakatoa
Flag of United Kingdom of Great Britain and Northern Ireland image

Obtain an Iterator from calling iterator() on the Collection returned from a call to values() in your class.
Avatar of pradeep_brat
pradeep_brat

ASKER

@krakatoa
I want to iterate using Struts2 tags in JSP...
ASKER CERTIFIED SOLUTION
Avatar of asanga_su
asanga_su
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi asanga_su that was the correct answer i was looking for. U deserve the point