Java Reference
In-Depth Information
service() has two parameters:
It throws these exceptions:
The getServletInfo() Method
public java.lang.String getServletInfo()
The getServletInfo() method provides the servlet user with information about the servlet
itself. You will usually include copyright or versioning information. getServletInfo() has no
parameters and throws no exceptions.
It returns this value:
The destroy() Method
public void destroy()
The destroy() method is the life cycle method that marks the end of a servlet's life. It is exe-
cuted only once, when the servlet is removed from the service. You should place all of your
clean-up functionality in this method. destroy() has no parameters, returns no value, and
throws no exceptions.
The ServletConfig Interface
The ServletConfig interface defines an object generated by a servlet engine and passes con-
figuration information to a servlet during startup. It contains name/value pairs of initialization
parameters for the servlet. It also contains a reference to the ServletContext object, described
in the next section. The ServletConfig interface defines four methods for accessing this infor-
The getServletContext() Method
public ServletContext getServletContext()
The getServletContext() method returns a reference to the current ServletContext object.
getServletContext() has no parameters and throws no exceptions.
Search WWH ::

Custom Search