Set cookie
IF (cookievalue == null || cookievalue.equals (")) {cookievalue =" - " TID " - ";} else {cookievalue =" - " TID cookievalue.replaceAll (" - " tid " - "," - ");} // out.println (" cookievalue = " cookievalue; cookie = new cookie (cookiename, cookievalue); cookie.setMaxage (3600); response.addcookie (cookie);
Get cookie
String cookiename = "LatestViewType"; String CookieValue = ""; cookie cookies [] = request.getCookies (); cookie cookie = null; if (cookies! = Null) {for (int i = 0; i
Cookie = cookies [i];
IF (cookie.getname (). Equalsignorecase (cookiename)) {
CookieValue = cookie.getValue ();
Break;
}
}
}