title: Calculate total sum of all numbers in c:forEach loop
body: <p>I have a Java bean like this:</p>
  
  <pre><code>class Person {
    int age;
    String name;
  }
  </code></pre>
  
  <p>I'd like to iterate over a collection of these beans in a JSP, showing each person in a HTML table row, and in the last row of the table I'd like to show the total of all the ages.</p>
  
  <p>The code to generate the table rows will look something like this:</p>
  
  <pre><code>&lt;c:forEach var="person" items="${personList}"&gt;
    &lt;tr&gt;&lt;td&gt;${person.name}&lt;td&gt;&lt;td&gt;${person.age}&lt;/td&gt;&lt;/tr&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>However, I'm struggling to find a way to calculate the age total that will be shown in the final row <strong>without resorting to scriptlet code</strong>, any suggestions?</p>