title: Unable to find a value for "length" in object of class "java.lang.String" using operator "."
body: <p>Why does this JSTL expression not seem to be able to use the length method of the String class:</p>
  
  <pre><code>    &lt;c:when test="${displayName != null &amp;&amp; displayName.length &gt; 0 }"&gt;
          &lt;p&gt;&lt;c:out value="${displayName}"/&gt;&lt;/p&gt;
      &lt;/c:when&gt;
  </code></pre>
  
  <p>It produces this exception:</p>
  
  <pre><code>java.lang.RuntimeException: javax.servlet.ServletException: 
  javax.servlet.jsp.el.ELException: Unable to find a value for "length" in object 
  of class "java.lang.String" using operator "."
  </code></pre>
  
  <p>I have included the following tag libraries at the top of the JSP:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %&gt;
  &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %&gt;
  &lt;%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %&gt;
  &lt;%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %&gt;
  </code></pre>