Quick info for reference.
Loop through a Map and output the Key and Value data using;
<c:forEach items="${map}" var="entry"> Key: <c:out value="${entry.key}"/> Value: <c:out value="${entry.value}"/> </c:forEach>
If you have an object within the Key:Value pair, such as within an object Map
${map.key}
Then you can iterate over the above list using the code to get the Attribute data within the CustomerInformation object a follows;
<c:forEach items="${map.value}" var="customerInformation"> <tr> <td>${customerInformation.firstName}</td> </tr> </c:forEach>
Michael Cropper
Latest posts by Michael Cropper (see all)
- WGET for Windows - April 10, 2025
- How to Setup Your Local Development Environment for Java Using Apache NetBeans and Apache Tomcat - December 1, 2023
- MySQL Recursive Queries – MySQL While Loops – Fill Zero Sum Dates Between Dates - October 6, 2023