What are the difference between HttpServlet and
GenericServlets?

Answers were Sorted based on User's Feedback



What are the difference between HttpServlet and GenericServlets?..

Answer / himanshu verma

Generic Servlet is the general class to implement servlets.
it can use any protocol like MIME, SMTP etc. while HTTP
Servlet is specially designed for HTTP protocol.

Is This Answer Correct ?    2 Yes 0 No

What are the difference between HttpServlet and GenericServlets?..

Answer / niranjanravi

The diff is that inGeneracicServlet we had to implement the
service()method the GenericServlets service() method is
declared as abstract.But the Generic Servlet is not
implementing keeping the HttpSErvers in mind. Methods we
have in this class are
init()
log()
service()
While implementing the HTTP Servlet the service() method is
already implemented .service()method of HTTP sevlet is
declared as protected.the HTTPServlet is implementing
keeping the HttpSErvers in mind. Methods we have in this
class are
doGet(),doDelete(),doPost()

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More Servlets Interview Questions

How to run a servlet program?

7 Answers   Infosys,


What does the term localization refer to?

0 Answers  


What are the two important api's in for servlets?

0 Answers  


What is war file?

0 Answers  


Is tomcat a servlet container?

0 Answers  






can we create more than ServletContext and ServletConfig in your application

6 Answers   Patni,


what are binding listners?

1 Answers  


What is the advantage of Servlets when compared with other server side technologies?

0 Answers  


How to get the actual path of servlet in server?

0 Answers  


What are the differences between servlet context vs servlet config?

0 Answers  


List the Different types of servlet?

0 Answers  


Can we refresh servlet in client and server side automatically?

0 Answers  


Categories