<c:if test="${not empty userList)}">
<table cellpadding="5">
<tr class="even">
<th>Name</th>
<th>Gender</th>
<th>Country</th>
<th>About You</th>
</tr>
<c:forEach items="${userList}" var="user" varStatus="status">
<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
<td>${user.name}</td>
<td>${user.gender}</td>
<td>${user.country}</td>
<td>${user.aboutYou}</td>
</tr>
</c:forEach>
</table>
</c:if>
当我删除<c:if test="${not empty userList)}"></c:if>
它会引发错误。 这个条件检查什么?我的数据库表有用户列表,但是这整个代码不会显示在我的HTML本身中。这种情况有什么作用?
为什么这个标记的Java? – 2010-12-22 08:29:16