I have made a Cart where I need to print the specific order line number. I'm currently printing all the orders in a forEach and with my ${requestScope.cartsize} it is naturally giving my the full size. How do I use my forEach and only print the indexnumber in the array so it will naturally have 1, 2, 3, 4 and not 3, 3, 3, 3 if it shows all orders?
Cart is having:<br>
<c:forEach var="item" items="${sessionScope.cart.cupcakeList}">
Bottom: ${item.bottom.name} Topping: ${item.top.name} Price ${item.quantity} Order line number: ${requestScope.cartsize}
<form action="addtocart"><button name="removeFromCart" value="${requestScope.cartsize}"type="submit">Fjern fra kurv</button></form><br>
</c:forEach> ```