Java Reference
In-Depth Information
The getServletConfig() method returns a ServletConfig object containing any startup con-
figuration information for this servlet. getServletConfig() has no parameters and throws no
exceptions.
It returns this value:
ServletConfig
The getServletContext() Method
public ServletContext getServletContext()
The getServletContext() method returns a ServletContext object containing information
about the servlet's network service. getServletContext() has no parameters and throws no
exceptions.
It returns this value:
ServletContext
The getServletInfo() Method
public java.lang.String getServletInfo()
The getServletInfo() method returns a string containing servlet-specific information about
the implementing servlet. getServletInfo() has no parameters and throws no exceptions.
It returns this value:
java.lang.String
The init(ServletConfig config) Method
public void init(ServletConfig config)
throws ServletException
This init() method marks the beginning of a servlet's life. It is called only when the servlet is
first loaded, and it must execute successfully before the servlet can service requests. The
init() method should contain all initialization code for the servlet. It returns no value.
It has one parameter:
ServletConfig (encapsulates the servlet's startup configuration and initialization para-
meters)
It throws this exception:
ServletException
Search WWH ::




Custom Search