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)
- What is Docker? - February 8, 2023
- How to Clone a Hard Disk (HDD or SSD) - January 9, 2023
- How to Configure Apache Virtual Hosts on Linux - September 26, 2022