쿠키 및 세션을 이용한 카운터
쿠키를 이용한 카운터 다음 프로그램 “cCounter.jsp”는 쿠키를 이용해 카운터를 구현한 프로그램이다. 쿠키는 브라우저별로 각각 저장 관리되므로 이 프로그램은 프라우저별로 각각 1에서 시작하여 브라우저의 새로고침 버튼을 클릭할 때 마다 1 씩 증가된다. <%@ page language=”java” contentType=”text/html; charset=EUC-KR” pageEncoding=”EUC-KR”%><!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”><html><head><meta http-equiv=”Content-Type” content=”text/html; charset=EUC-KR”><title>Insert title here</title></head><body><%Cookie [] cookieArray = request.getCookies(); //… Read More »