title: Comparing two List values in JSTL tag
body: <p>I'm comparing two different values each from different list using JSTL tag, but I keep getting the error. I tried to change the brackets associated with it, but none worked. I searched for comparing two list values in JSTL, but none helps me.</p>
  
  <pre><code>&lt;c:forEach items="${commentsList}" var="commentsList"&gt;
      &lt;c:choose&gt;
          &lt;c:when test="${ ${commentsList.user.id} == '${blog.user.id}' }"&gt;
              &lt;li&gt;
                  &lt;div class="timeline-panel" style="float:right"&gt;
                      &lt;div class="timeline-heading" align="left"&gt;
                          &lt;b&gt;${commentsList.user.firstName}&amp;nbsp;${commentsList.user.lastName}&lt;/b&gt;
                      &lt;/div&gt;&lt;hr&gt;
                      &lt;div class="timeline-body" style="float: right;"&gt;
                          &lt;p&gt;${commentsList.comment}&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
             &lt;/li&gt;
         &lt;/c:when&gt;                            
         &lt;c:otherwise&gt;
             &lt;li class="timeline-inverted"&gt;
                  &lt;div class="timeline-panel"&gt;                                         
                      &lt;b&gt;${commentsList.user.firstName}&amp;nbsp;${commentsList.user.lastName}&lt;/b&gt;&lt;hr&gt;
                      &lt;div class="timeline-body"&gt;
                          &lt;p&gt;${commentsList.comment}&lt;/p&gt;                                                  
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/li&gt;
          &lt;/c:otherwise&gt;                              
      &lt;/c:choose&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Error is</p>
  
  <pre><code>"${ ${commentsList.user.id} == '${blog.user.id}' }" contains invalid expression(s): javax.el.ELException: Error Parsing: ${ ${commentsList.user.id} == '${blog.user.id}' }
  </code></pre>
  
  <p>I've not compared two list values before, btw I can compare two list values in jstl right?</p>