12 October 2010
1 What is GenericServlet?
GenericServlet
GenericServlet is a class which can be used for easy servlet programming than using Servlet interface.
Most often a web programmer will be intersted only in the service method of Servlet interface. But For implementing the Servlet interface, the programmer has to implement all the methods of it.
The class GenericServlet of javax.servlet package implements the servlet interface. And GenericServlet implements the init() and destroy() methods. The service() method is left as an abstract method for the servlet programmer to implement. So, for creating a servlet, it is easy to extend the GenericServlet class than to implement the Servlet interface.
Subscribe to:
Post Comments (Atom)
1 comments:
GenericServlet is also a protocol-independent servlet., tat can be used on any protocol..
Please give your valuable comments.