<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.Calendar" %>
<html>
<head>
</head>
<body>
<%
Calendar cal = Calendar.getInstance();
out.println("오늘은 ");
out.println(cal.get(Calendar.YEAR) + "년 ");
out.println(cal.get(Calendar.MONTH) + "월 ");
out.println(cal.get(Calendar.DATE) + "일 ");
%>
</body>
</html>
<%@ page import="java.util.Calendar" %>
<html>
<head>
</head>
<body>
<%
Calendar cal = Calendar.getInstance();
out.println("오늘은 ");
out.println(cal.get(Calendar.YEAR) + "년 ");
out.println(cal.get(Calendar.MONTH) + "월 ");
out.println(cal.get(Calendar.DATE) + "일 ");
%>
</body>
</html>
'Study > Programming' 카테고리의 다른 글
jsp 달력, 구구단 (0) | 2009.05.27 |
---|---|
JSP DB연동 (0) | 2009.05.27 |
JSP 구구단 (0) | 2009.05.27 |
자바 TCP MultiChat (0) | 2009.05.26 |
자바 Server, Client (0) | 2009.05.26 |