• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GenericServlet

 
sumit Sanghai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between HttpServlet and GenericServlet?
 
Medha kamat
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GenericServlet is protocol independent servlet which implements Servlet interface.HttpServlet extends GenericServlet and adds http specific tasks to it.It is an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A subclass of HttpServlet must override at least one method, usually one of these:

doGet if the servlet supports HTTP GET requests
doPost for HTTP POST requests
doPut for HTTP PUT requests
doDelete for HTTP DELETE requests
init and destroy to manage resources that are held for the life of the servlet getServletInfo which the servlet uses to provide information about itself
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic