title: JSP/JSTL: '2 > 10' Evaluates to true
body: <p>I have a very simple custom JSP tag that I am using to generate pagination links.  It goes roughly like:</p>
  
  <pre><code>&lt;span id="${id}" class="paginationLinks ${cssClass}"&gt;
      &lt;c:if test="${currentPage gt 1}"&gt;
          &lt;!-- Links to previous page(s) --&gt;
      &lt;/c:if&gt;
      &lt;span class="paginationCurrentPage"&gt;
          Page ${currentPage} 
          [DEBUG:  current=${currentPage}, 
                   total=${totalPages}, 
                   show=${currentPage lt totalPages} 
                   inverse=${currentPage gt totalPages}]
      &lt;/span&gt;
      &lt;c:if test="${currentPage lt totalPages}"&gt;
           &lt;!-- Links to next page(s) --&gt;
      &lt;/c:if&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>The problem is that the links to go to the next page are not showing up after the first page (<code>currentPage = 1</code>).  The links to go to previous pages are working correctly across every page.  I'm also getting some truly bizarre output from my debug block:</p>
  
  <pre><code>[DEBUG: current=1, total=10, show=true inverse=false]    //first page, correct
  [DEBUG: current=2, total=10, show=false inverse=true]    //second page; 2 &gt; 10 == true?  wtf???
  [DEBUG: current=9, total=10, show=false inverse=true]    //ninth page, still incorrect
  [DEBUG: current=10, total=10, show=false inverse=false]  //tenth page, correct
  </code></pre>
  
  <p>Both <code>currentPage</code> and <code>totalPages</code> are request attributes of type <code>long</code> and are passed to the tag via declared tag attributes.  So what have I done wrong to produce such insane output as <code>2 &gt; 10 == true</code>?</p>
  
  <p><strong>Update</strong></p>
  
  <p>It works correctly if I replace <code>totalPages</code> with a literal <code>10</code> in the comparison, but that really does not solve the problem.</p>