I need to loop over a particular list of rows pertaining to a database column, which is of type Integer
. This column in the database is the foreign key to the parent column ID in the same table.
I have to match the both these values and print in the JSP if there is a match.
I've gone through this link Evaluate list.contains string in JSTL and have been trying over to get it working. I don't know where exactly I've gone wrong.
Here is what I have so far:
<c:forEach var="List" items="${Section.LangList}">
<c:if test="${List['Lang'] == List['Id']}">
...
</c:if>
</c:forEach>
This is one of the things that I've used to compare the values. I've tried the contains
and the <c:set>
too. Is there something that I'm missing?