1. 생성 코드

        Cookie myCookie = new Cookie("myTestCookie", "HelloMyWorld");
        myCookie.setMaxAge(24*60*60);
        myCookie.setPath("/");
        response.addCookie(myCookie);

2. 조회 코드

        Cookie[] cookies = request.getCookies();
        out.print("cookie.length : "+cookies.length+"<br>");
        for ( int i=0; i<cookies.length; i++) {
                out.print("["+i+"] name : "+cookies[i].getName());
                out.print(" | value : "+cookies[i].getValue()+"<br>");
        }