<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@page import="java.util.Calendar"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
Calendar c=Calendar.getInstance();
int hour=c.get(Calendar.HOUR_OF_DAY);
int minute=c.get(Calendar.MINUTE);
int second=c.get(Calendar.SECOND);
%>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>현재시간</title>
</head>
<body>
<h1>현재시간은 <%=hour%>시<%=minute%>분<%=second%>초 입니다.</h1>
</body>
</html>
pageEncoding="EUC-KR"%>
<%@page import="java.util.Calendar"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
Calendar c=Calendar.getInstance();
int hour=c.get(Calendar.HOUR_OF_DAY);
int minute=c.get(Calendar.MINUTE);
int second=c.get(Calendar.SECOND);
%>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>현재시간</title>
</head>
<body>
<h1>현재시간은 <%=hour%>시<%=minute%>분<%=second%>초 입니다.</h1>
</body>
</html>
'개발하자 > JSP&Servlet' 카테고리의 다른 글
key값과 value값 얻어오기map.get(key)과map.entrySet()이용 (0) | 2015.02.16 |
---|---|
키값만 뽑아내기 (0) | 2015.02.16 |
파일이름만 링크 (0) | 2015.02.13 |
파일목록 불러오기listFiles(),getName() (0) | 2015.02.13 |
로그인 성공/실패 (0) | 2015.02.13 |