I am creating a page using JSTL and I want to create a variable that accumulates a total within twoforEach
<c:forEach var="mesas" items="${result.cuentas.mesas}">
<c:forEach var="saldoMesa" items="${mesas.saldo}">
Aqui quiero que mi variable se acumule
</c:forEach>
</c:forEach>
That's my code, and I want to print such a variable in a div.
You can use
<c:set>
: