在我的 java web 应用程序中,我有一个名为“sell”的数据表
sell(id_sell,id_buyer,id_product,date,final_price,shipping_price,sales_tax)
我创建了一个 jsp 页面,其中显示有关用户的一些信息,例如在拍卖中获胜的产品;这些产品被描述为“销售”。在这个页面中,我必须使用 jstl 库,我的想法是使用 'c:forEach' 标记来迭代表的每一行。
这是我的代码:
<table class="table table-bordered">
<thead>
<tr>
<th>Product</th>
<th>Date</th>
<th>Final Price</th>
<th>Shipping Price</th>
<th>Salex Tax</th>
</tr>
</thead>
<tbody>
<c:forEach var="s" items="${sell}">
<tr>
<td><c:out value="${s.id_product}"/></td>
<td><c:out value="${s.date}"/></td>
<td><c:out value="${s.final_price}"/></td>
<td><c:out value="${s.shipping_price}"/></td>
<td><c:out value="${s.sales_tax}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
但是这段代码只显示了一个空表。我在哪里做错了?我必须导入一些东西吗?