這是我目前的情況。如果我像下面的代碼,它永遠不會顯示,因爲它沒有價值。顯示jsp的值
<% int z = 0;
int count = 3
do { %><% z++;} <c:if test="${not empty array[z]}">
<td width="50%" height="15px">${array[z]}</td>
</c:if> while (z < count);%>
我試着這樣的代碼(硬編碼,用0代替z),它會顯示記錄。
<% int z = 0;
int count = 3
do { %><% z++;} <c:if test="${not empty array[0]}">
<td width="50%" height="15px">${array[0]}</td>
</c:if> while (0 < count);%>
也許你們可以指導我如何讓它讀取z值,但不能讀取z值。對不起,我的英語不好。
這是否甚至編譯?你將進入scriptlet模式並在那裏添加標籤,由於標籤不是Java代碼,所以不應該編譯。 – Thomas