Classes

Classes for the javax.servlet package are GenericServlet, ServletInputStream, and ServletOutputStream. Their methods are described in the following sections.

GenericServlet Class

The GenericServlet class was created to provide a basic foundation of new servlets. It provides default life cycle methods and default implementations of the ServletConfig's methods.

GenericServlet() Method
public GenericServlet()

The GenericServlet() method is an empty default constructor. GenericServlet() has no parameters, returns no value, and throws no exceptions.

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 ...

Get Pure Java Server Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.