What is the difference between GenericServlet, HttpServlet and a Servlet?

Viewed 70601

I was searching for exact difference between javax.servlet.http.HttpServlet , javax.servlet.GenericServlet and javax.Servlet unable to find it out.

"Exact Difference" means

  1. Usage
  2. Reason behind javax.servlet.GenericServlet existence
11 Answers
  1. http servlet is an class which is specific and allows only http protocol not allowed to other protocol like ftp smtp
  2. generic servlet are allowed all types of protocol only one abstract method that is service method and other four method are concrete method
  3. generic servlet is the superclass of http servlet
Related