title: String to Long comparison throws "ELException: Cannot convert" in Tomcat 7, works in Tomcat 6
body: <p>The following snippet works fine in Tomcat 6,</p>
  
  <pre><code>&lt;c:set var="abc" value="$12,345" /&gt;
  &lt;c:choose&gt;
      &lt;c:when test="${abc ne 0}"&gt;
          &lt;c:out value="PASS"&gt;&lt;/c:out&gt;
      &lt;/c:when&gt;
      &lt;c:otherwise&gt;
          &lt;c:out value="FAIL"&gt;&lt;/c:out&gt;
      &lt;/c:otherwise&gt; 
  &lt;/c:choose&gt;
  </code></pre>
  
  <p>but throws exception in Tomcat 7.</p>
  
  <pre><code>javax.el.ELException: Cannot convert $1,2345 of type class java.lang.String to class java.lang.Long
      at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:304)
      at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:283)
      at org.apache.el.lang.ELSupport.equals(ELSupport.java:143)
      at org.apache.el.parser.AstNotEqual.getValue(AstNotEqual.java:40)
      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
      at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:1026)
      at org.apache.jsp.WEB_002dINF.jsp.web.statussummary.status_005fsummary_jsp._jspx_meth_c_005fwhen_005f0(status_005fsummary_jsp.java:290)
  </code></pre>
  
  <p>Looks like there is a difference in the way the expression <code>${abc ne 0}</code> is evaulted in Tomcat 7. In Tomcat 6 both <code>${abc}</code> and <code>${0}</code> are compared as Strings but in Tomcat 7 I get this exception. I do not know why this should happen and which class file of which API is responsible for this.</p>
  
  <p>How is this caused and how can I solve it?</p>