<c:forEach items = "${shopList}" var = "shop">
<tr>
<td>${shop.shopID}元</td>
<td>${shop.shopName}元</td>
<td>${shop.costPrice}元</td>
<td>${shop.flatPrice}元</td>
<td>${shop.flatPrice - shop.costPrice}元</td>
</tr>
</c:forEach>
<tr>
<td colspan="4" align="center">总利润</td>
<td>
???????---------------
</td>
</tr>
图:
<c:set var="sum" value="0"/>
<c:forEach items = "${shopList}" var = "shop">
<tr>
<td>${shop.shopID}元</td>
<td>${shop.shopName}元</td>
<td>${shop.costPrice}元</td>
<td>${shop.flatPrice}元</td>
<td>${shop.flatPrice - shop.costPrice}元<c:set var="sum" value="${sum+shop.flatPrice - shop.costPrice}"/></td>
</tr>
</c:forEach>
<tr>
<td colspan="4" align="center">总利润</td>
<td>
${sum}
</td>
</tr>