Ho can i loop through a java hash map Map<String, Object>
in JSP and display the output. I have seen posts regarding Map<string, String>
but couldnt find anything for Object.
Can somebody post an example for the same.
Asked
Active
Viewed 333 times
-2

Aby
- 23
- 6
-
Share the code for "I have seen posts regarding Map
" first with your problem statement. – Shubhendu Pramanik Oct 27 '17 at 07:26 -
https://stackoverflow.com/questions/1835683/how-to-loop-through-a-hashmap-in-jsp https://stackoverflow.com/questions/9257240/how-to-iterate-hashmap-using-jstl-foreach-loop Already answered ! – Vipin CP Oct 27 '17 at 07:41
1 Answers
0
Below is an example of Map iteration in JSP:
<c:forEach items="${map}" var="item">
<option value="${item.key}">${item.value}</option>
</c:forEach>

Anastasios Vlasopoulos
- 1,792
- 22
- 34