GenericServlet belongs to javax.servlet package
GenericServlet is an abstract class which extends Object and implements Servlet, ServletConfig and java.io.Serializable interfaces.
The direct subclass to GenericServlet is HttpServlet.It is a protocol-independent servlet.
To write a GenericServlet you need abstract service() to be overridden.
HttpServlet:
HttpServlet belongs to javax.servlet.http package
This is an abstract class which extends GenericServlet and implements java.io.Serializable
A subclass of HttpServlet must override at least one method of doGet(), doPost(),doPut(), doDelete(), init(), destroy(), getServletInfo()
Generic servlets works for every protocal and Http servlet works for only Http protocol.
HttpServlet is a protocol dependent whereas GenericServlet is protocol independent
The servlet that gets invoked with Common Gateway Interface protocol is known has Generic Servlet. Limitation: Request Replication.The servlet that is invoked by HTTP protocol is know as HTTP Servlet.Advantage: It don't replicate the request.
i hope , these explanations is enough to understand Generic Servlet vs HTTp servlets..