如何在顯示錶格時將支票放入jsp頁面中?我想提出一個檢查我的JSP頁面上,如果有我的表沒有數據它會顯示沒有找到而不是空白表結果。下面是我正在使用的jsp。如何在顯示錶格時將支票放入jsp頁面中?
<%@ taglib prefix="myFunc" uri="simpleTags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div id="resultContainer">
<div id="resultChild" class="resultChild">
<table class="TFtable" style="width: 100%;">
<tr>
<th colspan="2" style="font-size: 13px;">${platform} results for "${searchTerm}"</th>
</tr>
<tr>
<td style="font-size: 12px;">
<c:forEach var="searchTerm" items="${searchTextResult}" varStatus="position">
<c:set var="searchTermDetail" value="${searchTerm}" />
<c:set var="productDetail" value="${myFunc:fetchProductDetailsTool(searchTermDetail)}" />
<font class="bestResult"> <a class="bestResult" title='<c:out value="${productDetail}"></c:out>'>
<c:out value="${searchTermDetail}"></c:out></a></font> ,
</c:forEach>
</td>
</tr>
</table>
<br>
<table class="TFtable" style="width: 100%;">
<tr>
<th colspan="2" style="font-size: 13px;">Clickstream results for "${searchTerm}" </th>
</tr>
<tr>
<td style="font-size: 12px;">
<c:forEach var="searchTerm" items="${searchClickStreamResult}" varStatus="position">
<c:set var="searchTermDetail" value="${searchTerm}" />
<c:set var="productDetail" value="${myFunc:fetchProductDetailsTool(searchTermDetail)}" />
<font class="bestResult"> <a class="bestResult" title='<c:out value="${productDetail}"></c:out>'>
<c:out value="${searchTermDetail}"></c:out></a></font> ,
</c:forEach>
</td>
</tr>
</table>
</div>
</div>
請告訴我們你已經嘗試了什麼。我沒有看到企圖達到預期的行爲。 –