for循环:
<c:choose>
<c:when test="${not empty list}">
<c:forEach items="${list}" var="item">
<tr><td width="15%"><!-- <i class="i-select"></i> --><input type="checkbox" class="checkall" name="chkId"/></td>
<td width="45%" class="text-left">${item.title}</td>
<td width="20%"><fmt:formatDate type="both" value="${item.addtime}" /></td>
<td width="20%"><div style="display:table;"><a href="#">修改</a><a class="J_tjsh" href="javascript:;">删除</a></div></td>
</tr></c:forEach>
</c:when>
<c:otherwise><tr><td colspan="4">暂无数据</td></tr></c:otherwise>
</c:choose>
时间格式转换:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatDate value="${item.addtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
页面导入包:
<%@ page import="com.jronny.common" %>