Coding methods in the GenericServlet class

The GenericServlet class implements the Servlet interface to provide functionality for non-HTTP servlets. Because the HttpServlet class overrides GenericServlet, these methods are also available to servlets that extend HttpServlet.

If your servlet extends the GenericServlet class, it must override the service method. If necessary, your servlet can also override the getServletInfo, init, and destroy methods. Additionally, the GenericServlet class includes methods that you can use to access servlet, request, and application information.

For more information on methods of the GenericServlet class, see the Servlet API documentation.