<% String mycookie = null; String myvalue = null; Cookie[] cookies = request.getCookies(); if(cookies != null) { for(int i=0; i cookieUse.jsp

쿠키 확인


쿠키 이름 : <%=mycookie %>

쿠키 값 : <%=myvalue %>

"> <% String mycookie = null; String myvalue = null; Cookie[] cookies = request.getCookies(); if(cookies != null) { for(int i=0; i cookieUse.jsp

쿠키 확인


쿠키 이름 : <%=mycookie %>

쿠키 값 : <%=myvalue %>

"> <% String mycookie = null; String myvalue = null; Cookie[] cookies = request.getCookies(); if(cookies != null) { for(int i=0; i cookieUse.jsp

쿠키 확인


쿠키 이름 : <%=mycookie %>

쿠키 값 : <%=myvalue %>

">
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String mycookie = null;
String myvalue = null;
Cookie[] cookies = request.getCookies();
if(cookies != null) {
	for(int i=0; i<cookies.length; i++){
		if(cookies[i].getName().equals("ckTest")){
			mycookie = cookies[i].getName();
			myvalue = cookies[i].getValue();
		}
	}
}
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>cookieUse.jsp</title>
</head>
<body>
	<h1>쿠키 확인</h1>
	<br>
	<p>쿠키 이름 : <%=mycookie %></p>
	<p>쿠키 값 : <%=myvalue %></p>
</body>
</html>