jsp头文件:
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c”%>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/functions” prefix=”fn”%>
<%@ taglib prefix=”fmt” uri=”http://java.sun.com/jsp/jstl/fmt” %>
<jsp:useBean id="myDate" class="java.util.Date"/>
应用:
<td>
<c:set target="${myDate}" property="time" value="${order.time*1000}"/>
<fmt:formatDate pattern="yyyy-MM-dd HH:mm" value="${myDate}" type="both"/>
</td>