<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String cp = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:set var="now" value="<%=new java.util.Date() %>"/>
날짜 : <fmt:formatDate value="${now }" type="date"/><br/>
시간 : <fmt:formatDate value="${now }" type="time"/><br/>
both : <fmt:formatDate value="${now }" type="both"/><br/>
숫자 : <fmt:formatNumber value="123456.123" type="number" /><br/>
숫자 : <fmt:formatNumber value="123456.123" type="number" pattern=".00"/><br/>
통화 : <fmt:formatNumber value="123456.123" type="currency" /><br/>
통화 : <fmt:formatNumber value="123456.123" type="currency" currencySymbol="₩"/><br/>
</body>
</html>
'JSP(Java Server Page) > JSTL' 카테고리의 다른 글
JSTL (0) | 2014.04.28 |
---|---|
c:set으로 선언한 변수 사용하는 법 (0) | 2013.09.09 |
JSTL import (0) | 2013.07.02 |
JSTL varStatus (0) | 2013.07.02 |
JSTL forEach문 (0) | 2013.07.02 |