What is the need for having HTTPServlet class when we already have GenericServlet class which can handle all type of requests?

Showing Answers 1 - 15 of 15 Answers

makunni

  • Nov 7th, 2007
 

Http servlet has few more methods in it and also if helps us in not using or overriding all the methods that are listed in Generic, and just use the methods that are needed

  Was this answer useful?  Yes

sampra

  • Mar 4th, 2008
 

Http servlet has few more methods in it and also if helps us in not using or overriding all the methods that are listed in Generic, and just use the methods that are needed http is statless protocol and use for http request.

  Was this answer useful?  Yes

satin40

  • Apr 20th, 2009
 

Http servlets is the sub class of Generic servlet so all the life cycle methods available in the generic servlets are available to the Http servlets. Http servlets provides methods that supports cookies, sessions etc. While generic servlets are not. Http servlet request,Http servlet response methods extends generic servlet request,generic servlet response. HttpServlet is used to handle only http request & response but whereas Generic servlet can be used to handle any type of requests and responses, such as FTP...

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions