WriteCookie
public interface WriteCookie {
public boolean getHasKeys();
public Enumerator getKeys();
public void setDomain(String domainName);
public void setExpires(Date d);
public void setItem(String name, String item);
public void setValue(String value);
public void setPath(String path);
public void setSecure(boolean secure);
}
Returns true if the cookie contains keys.
Returns an Enumerator that can be used to access the keys for the Cookie.
public void setDomain(String domainName)
Sets the Domain attribute of the Cookie to the specified value.
public void setExpires(Date d)
Sets the Expires attribute of the Cookie to the specified value. This date must be set in order for the cookie to be maintained after the session ends. If this attribute is not set to a date beyond the current date, the cookie will expire when the session ends.
public void setItem(String name, String item)
This treats the Cookie as a dictionary cookie and item is the value for the cookie's name.
public void setValue(String value);
This treats the Cookie as a simple cookie, and sets the cookies value to value.
public void setPath(String path)
Sets the Path attribute of the Cookie to path. You can use this method to specify that the cookie should be sent only to requests on a particular path. If this attribute is not set, the application path is used.
public void setSecure(boolean secure);
Sets the Secure attribute of the Cookie to the specified value. You can use this method to specify that a cookie is secure. If you set this value to true, a Secure flag will be added to the Set-Cookie header sent to the client. The Secure flag instructs the client to use only secure means to access the server when sending back the cookie.