The getValue method of the Cookie class returns a string that represents a Cookie object that has no keys.
public java.lang.String getValue();
The following example retrieves the value of a cookie.
import aspcomp.*; public class getvalue { public Boolean getcookie() { Request request = AspContext.getRequest(); CookieDictionary cookDict = request.getCookies(); Cookie myCook = cookDict.getCookie("CustInfo"); String cookstring myCook.getValue (); if (!cookstring .equals("")) { //there is a valid cookie return true } else { //there isn't return false } } }