I am using jsp + spring mvc, and on jsp page I have some list – catList with idand name and also have some variable test. I am trying to compare cat.id and test, but can’t because every time have runtime syntax errors:
<c:forEach var="cat" items="${catList}" varStatus="i">
<c:out value="${cat.id}"/>
<%-- comparison and some action--%>
</c:forEach>
tried:
<c:if test="${category.id == test}" >
<c:if test="${category.id eq test}" >
<c:if test="${category.id eq ${test}}">
Update: I resolved this problem, simply it was error with server redeploy
All JSTL tags (as well as XML and HTML tags) require an opening tag and a closing tag. The opening tag defines where the tag body starts (and also allows you to define attributes). The closing tag defines where the tag body ends.
In the following code sample, the closing tag is on the last line.
As you can see, it has the same name as the opening tag, and starts with a
/(and has no attributes).The first two opening tags that you included in your question should work.