Java Reference
In-Depth Information
The Cookie() constructor initializes a Cookie object with the passed-in name/value pair.
Names cannot contain whitespace, commas, or semicolons and should only contain ASCII
alphanumeric characters. Cookie() returns no value and throws no exceptions.
It has two parameters:
java.lang.String
java.lang.String
The setComment() Method
public void setComment(java.lang.String purpose)
The setComment() method is used to describe the cookie's purpose when requested by the
client. setComment() returns no value and throws no exceptions.
It has one parameter:
java.lang.String
The getComment() Method
public java.lang.String getComment()
The getComment() method returns the comment used to describe the cookie's purpose.
getComment() has no parameters and throws no exceptions.
It returns this value:
java.lang.String
The setDomain() Method
public void setDomain(java.lang.String pattern)
The setDomain() method sets the pattern to match the host's domain. If the host does not
match, the cookie will not be presented to the host. setDomain() returns no value and throws
no exceptions.
It has one parameter:
java.lang.String
The getDomain() Method
public java.lang.String getDomain()
The getDomain() method returns the domain pattern of this cookie. getDomain() has no para-
meters and throws no exceptions.
Search WWH ::




Custom Search