gpt4 book ai didi

jsp - tag in JSP

转载 作者:行者123 更新时间:2023-12-03 15:13:02 25 4
gpt4 key购买 nike

如果商品的计数值为 0,我想写购物篮为空。这是我的失败尝试。我想知道如何做到这一点。

<c:forEach items="${lstCart}" var="cartItem" varStatus="count">
<form action="Cart" method=Post>
<tr height="40px">

<c:choose>
<c:when test='${count.count} < 1'>

<td> Shopping Basket is empty! </td>
</c:when>
<c:otherwise>

<td>${count.count}</td>
<td>${cartItem.productName}</td>
<td>${cartItem.quantity}</td>
<td>${cartItem.unitPrice}</td>
<td>${cartItem.totalPrice}</td>
<td>
<input type="hidden" name="id" value="${cartItem.productId}" />
<input type=submit value="x"></td>
</c:otherwise>
</c:choose>
</tr>

</form>
</c:forEach>

最佳答案

关闭,但应该是这样的:

<c:when test='${count.count < 1}'>

关于jsp - <c :choose> tag in JSP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5848060/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com