Generic Servlet:
1. GenericServlet class is direct subclass of Servlet interface.
2. Generic Servlet is protocol independent.It handles all types of protocol like http, smtp, ftp etc.
3. Generic Servlet only supports service() method.It handles only simple request
public void service(ServletRequest req,ServletResponse res ).
4. Generic Servlet only supports service() method.
HttpServlet:
1. HttpServlet class is the direct subclass of Generic Servlet.
2. HttpServlet is protocol dependent. It handles only http protocol.
3. HttpServlet supports public void service(ServletRequest req,ServletResponse res ) and protected void
service(HttpServletRequest req,HttpServletResponse res).
4. HttpServlet supports also doGet(),doPost(),doPut(),doDelete(),doHead(),doTrace(),doOptions()etc.