Difference between httpservlet and generic servlets?



Difference between httpservlet and generic servlets?..

Answer / Vibha Yadav

The main difference between HTTPServlet and GenericServlet lies in their implementation details: HTTPServlet overrides methods like doGet() and doPost(), while GenericServlet overrides service() method. Additionally, HTTPServlet is designed to handle HTTP-specific features, such as cookies and headers, whereas GenericServlet offers a more general approach that can be used with various protocols.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

How can a servlet refresh automatically if some new data has entered the database?

3 Answers   Citi Bank, CitiGroup, IBM, Satyam,


What do you mean by default initialization in java servlet?

1 Answers  


what is the difference between doGet() and doPost()?

6 Answers   TCS,


what are binding listners?

1 Answers  


What is a servlet context object?

1 Answers  


What is servlet container. how it works?

1 Answers  


How ThreadSafe page attribute will be working in Servlet as well as in JSP?Automatically ThresdSafe is true in JSP so service method will be destroy in each and every request or not?so how thresd will handle srevice method?

1 Answers   AZTEC,


when the jsp page is translated to servlet?

5 Answers   HCL,


Hi Frieds, I am new to servlet why to use servlet in webapplication. what i know is " use servlet as a controller in mvc and to implemnent business logic . is it correct ? One more thing reason for implementing business logic with servlets , why not jsp.

4 Answers  


How do I know if java is running on linux?

1 Answers  


How we can get ip address of client in servlet?

1 Answers  


Elucidate servlet attributes and its scope?

1 Answers  


Categories