카테고리 없음
퇴근 후 JSP - Server Response
제이아이엔
2023. 4. 28. 18:00
반응형
2023.04.28 - [분류 전체보기] - 퇴근 후 JSP
퇴근 후 JSP
https://www.tutorialspoint.com/jsp/jsp_client_request.htm HTTP Header Request Example Header Name Header Value(s) 1. HTTP 프로토콜 무엇인가? 데이터를 전송하는 통신규약 예를 들어서 무역을 할때 다른나라 향신료를 살때
jiain.tistory.com
<%@ page import = "java.io.*,java.util.*" %>
<html>
<head>
<title>Auto Refresh Header Example</title>
</head>
<body>
<center>
<h2>Auto Refresh Header Example</h2>
<%
// Set refresh, autoload time as 5 seconds
response.setIntHeader("Refresh", 5);
// Get current time
Calendar calendar = new GregorianCalendar();
String am_pm;
int hour = calendar.get(Calendar.HOUR);
int minute = calendar.get(Calendar.MINUTE);
int second = calendar.get(Calendar.SECOND);
if(calendar.get(Calendar.AM_PM) == 0)
am_pm = "AM";
else
am_pm = "PM";
String CT = hour+":"+ minute +":"+ second +" "+ am_pm;
out.println("Current Time is: " + CT + "\n");
%>
</center>
</body>
</html>
response headers 중에서 Refresh를 활용해서 자동으로 새로고침해주게 만들 수 있다.
https://jamesdreaming.tistory.com/95
[ 자바 코딩 ] Calendar 에 원하는 날짜, 시간 정보 셋팅하기
바로 전 포스팅에서 Calendar 객체를 이용하여 현재 날짜, 요일, 시간 정보를 가져 오는 방법에 대해 정리 했습니다. 이번에는 원하는 날짜 및 시간 정보 등을 입력 하고 이를 다시 사용 하는 방법
jamesdreaming.tistory.com
728x90