<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String cookieName="id";
Cookie cookie=new Cookie(cookieName, "jangan");
cookie.setMaxAge(60*2);
response.addCookie(cookie);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cookie 생성하는 파일</title>
</head>
<body>
<H2>Cookie생성하는 페이지</H2>
"<%=cookieName %>"쿠키가 생성되었습니다<br>
<form method="post" action="useCookie.jsp">
<input type="submit" value="생성된 쿠키 확인">

</form>
</body>
</html>