after a loop runs and populates a data table I want to calculate the totals of the columns and display them on the last row.
This is my code to populate the table…I need to build the last row:
<table class="data_table">
<tr>
<th>Source Of Issues</th>
<th>First Issues</th>
<th>second Issues</th>
<th>Changes</th>
</tr>
<c:forEach var="bean" items="${beans}" varStatus="loopCount">
<tr>
<td><a href="foobar">${bean.sorCode}</a></td>
<td class="right"><fmt:formatNumber value='${bean.firstissue}'
type="currency" groupingUsed='true' /></td>
<td class="right"><fmt:formatNumber value='${bean.secondissue}'
type="currency" groupingUsed='true' /></td>
<td class="right"><fmt:formatNumber value='${bean.changes}'
type="currency" groupingUsed='true' /></td>
</tr>
</c:forEach>
</table>
1 Answer