JSP
JSTL <fmt:formatDate> 커스텀액션
헝그리하트
2013. 3. 22. 00:10
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="date" value="<%=new Date() %>"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
[오늘의 날짜] <fmt:formatDate value="${date}"/><br />
[현재의 시각] <fmt:formatDate value="${date}" type="time"/><br />
</body>
</html>