Science, asked by anjalimahali633, 1 year ago

Difference between genericservlet and httpservlet

Answers

Answered by tarun60
0


GenericServlet:

Generic Servlet is protocol independent(i.e)it can handle all types of protocols like http, ftp, smtp etc.

GenericServlet class is direct subclass of Servlet Interface.

GenericServlet is an abstract class which implements Servlet, ServletConfig and java.io.Serializableinterfaces.

GenericServlet belongs to javax.servlet package.

Httpservlet:


HttpServlet is protocol dependent. It supports only http protocol.

HttpServlet class is the direct subclass of Generic Servlet.

HttpServlet is an abstract class which extends GenericServlet and implements java.io.Serializable interface.

HttpServlet belongs to javax.servlet.http package.
Similar questions