Java Reference
In-Depth Information
The
getVersion()
Method
public int getVersion()
The
getVersion()
method returns the version number of the cookie. A zero indicates that the
cookie is based on the original specification developed by Netscape. A one indicates the cookie
is based on the RFC 2109.
getVersion()
has no parameters and throws no exceptions.
It returns this value:
•
int
C
The
setVersion()
Method
public void setVersion(int value)
The
setVersion()
method sets the cookie protocol used when the cookie saves itself.
setVersion()
returns no value and throws no exceptions.
It has one parameter:
•
int
The
clone()
Method
public java.lang.Object clone()
The
clone()
method returns a copy of this object.
clone()
has no parameters and throws no
exceptions.
It returns this value:
•
java.lang.Object
The
HttpServlet
Class
public class HttpServlet
extends javax.servlet.GenericServlet
implements java.io.Serializable
The
HttpServlet
class is meant to simplify the writing of HTTP servlets. It extends the
GenericServlet
class and implements the
java.io.Serializable
interface. The
HttpServlet
class is an abstract class; therefore it cannot be instantiated directly. The
HttpServlet
class
has 11 methods, described in the following sections.
The
HttpServlet()
Method
public HttpServlet()
The
HttpServlet()
constructor is a default empty constructor.
HttpServlet()
has no parame-
ters, returns no value, and throws no exceptions.