title: How to print size of a List with Struts2?
body: <p>How do I print the size of list with Struts2? The following prints nothing for the size. However, I can iterate over the results and print each item.</p>
  
  <pre><code>&lt;s:if test="results != null"&gt;
      &lt;div id="results"&gt;
          Results: &lt;s:property value="results.size"/&gt; results&lt;br/&gt;
  </code></pre>
  
  <p>I also tried <code>${results.size}</code> but that failed with an error.</p>
  
  <h3>Code</h3>
  
  <pre><code>public List&lt;Study&gt; results;
  public List&lt;Study&gt; getResults() {
      return results;
  }
  </code></pre>
  
  <h3>Browser</h3>
  
  <p>Results: results</p>
  
  <h3>Reference</h3>
  
  <p><a href="https://struts.apache.org/release/2.0.x/docs/property.html" rel="nofollow">https://struts.apache.org/release/2.0.x/docs/property.html</a>
  <a href="http://www.roseindia.net/struts/struts/struts2.2.1/tags/arrayValue.html" rel="nofollow">http://www.roseindia.net/struts/struts/struts2.2.1/tags/arrayValue.html</a> (This shows .size working! WTF?)</p>
  
  <h3>Version</h3>
  
  <p>struts2-core-2.3.15.1.jar</p>