我需要在JSP中創建一個表,一個頭,然後單元格根據索引的輸入形式。所以它會如下所示。每個新行都是從一個循環計算出來的,其中來自用戶的輸入的限制是它將下降的行數。在JSP中迭代指定次數
<column1header><column2header>
<1> <1 computed>
<2> <2 computed>
<...> <............>
<limit> <limit computed>
我需要在JSP中創建一個表,一個頭,然後單元格根據索引的輸入形式。所以它會如下所示。每個新行都是從一個循環計算出來的,其中來自用戶的輸入的限制是它將下降的行數。在JSP中迭代指定次數
<column1header><column2header>
<1> <1 computed>
<2> <2 computed>
<...> <............>
<limit> <limit computed>
你可以這樣說:
<table>
<!-- here should go some titles... -->
<tr>
<th>column1header</th>
<th>column2header</th>
</tr>
<c:forEach var="i" begin="0" end="${user.limit}">
<tr>
<td>${i}</td>
<td>${i} computed</td>
</tr>
</c:forEach>
</table>
請參考以下鏈接:
How to create table dynamically using count and JSTL ForEach
你的問題是什麼?你的輸出現在的行爲如何? – wawek
所以你應該尋找能夠解決這個異常的線程。也許這一個會幫助你http://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r – wawek