Java Reference
In-Depth Information
The GenericServlet Class
The GenericServlet class was created to provide a basic foundation of new servlets. It pro-
vides default life cycle methods and default implementations of the ServletConfig 's methods.
B
The GenericServlet() Method
public GenericServlet()
The GenericServlet() method is an empty default constructor. GenericServlet() has no
parameters, returns no value, and throws no exceptions.
The destroy() Method
public void destroy()
The destroy() method is executed when the servlet is removed from the running service. It
performs any cleanup of resources that were allocated in the init() method. destroy() has
no parameters, returns no value, and throws no exceptions.
The getInitParameter() Method
public java.lang.String getInitParameter(
java.lang.String name)
The getInitParameter() method returns a string containing the value of the initialization
parameter keyed by the passed-in name. getInitParameter() throws no exceptions.
It has one parameter:
java.lang.String
It returns this value:
java.lang.String
The getInitParameterNames() Method
public java.util.Enumeration getInitParameterNames()
The getInitParameterNames() method returns an enumeration containing all of the names for
each initialization parameter. getInitParameterNames() has no parameters and throws no
exceptions.
It returns this value:
java.util.Enumeration
The getServletConfig() Method
public ServletConfig getServletConfig()
 
Search WWH ::




Custom Search