I've an HashMap like this one {1={descrizione=prova2, post_file=2.PNG., postID=2, userID=37}, 2={descrizione=prova2, post_file=2.PNG., postID=2, userID=37}}
, and I pass it from the servlet (where it's generated) to a JSP page.
In this page I'd like only to get the descrizione, post_file and userID attributes.
I've tried many things, first of all I did a nested for loop that printed everything
<c:forEach var="entry" items="${post}">
<c:forEach var = "risultati" items = "${entry}">
<div id = "post">
<div>${risultati.value}</div>
</div>
</c:forEach>
<br>
</c:forEach>
This worked, then I tried to do
<div>${risultati["postID"}</div>
or <div>${risultati.postID}</div>
but I got errors (javax.el.PropertyNotFoundException: Property [values] not found on type [java.util.HashMap$Node]
) or nothing happened.
I have tried to search a lot but I have not found anything, could please anyone help me out with this?