title: How to compare 2 variables with <c:if>
body: <p>I am using jsp + spring mvc, and on jsp page I have some list - <code>catList</code> with <code>id</code>and <code>name</code> and also have some variable <code>test</code>. I am trying to compare <code>cat.id</code> and <code>test</code>, but can't because every time have runtime syntax errors:</p>
  
  <pre><code>&lt;c:forEach var="cat" items="${catList}" varStatus="i"&gt;
    &lt;c:out value="${cat.id}"/&gt;
   &lt;%-- comparison and some action--%&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>tried:</p>
  
  <pre><code>&lt;c:if test="${category.id == test}" &gt;
  &lt;c:if test="${category.id eq test}" &gt;
  &lt;c:if test="${category.id eq ${test}}"&gt;
  </code></pre>
  
  <p><strong>Update</strong>: I resolved this problem, simply it was error with server redeploy</p>