<%@ page import="java.util.Date" %> <%@ page import="java.net.*" %> <% String cookieName="GreenCookie"; Date now=new Date(); String timestamp=now.toString(); Cookie myCookie=new Cookie(cookieName,URLEncoder.encode(timestamp)); response.addCookie(myCookie); %>

The CSO CookiePortal
Welcome to the Chemistry and Materials
of Cookies
Session: <%= session.getId() %>
Value: <%= URLDecoder.decode(myCookie.getValue()) %>