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

Explain the steps involved in placing a servlet within a package?

0 Answers  


What is meant by session? Tell me something about httpsession class?

0 Answers  


What are the different ways we can maintain state between requests?

0 Answers  


init() method of servlet loaded by?

3 Answers  


why are using HttpServlet in realtime projects and why are not using Genericservlet

2 Answers  


What are important features of Servlet 3?

0 Answers  


How do you get the ip address of the client in servlet?

0 Answers  


What is the use of httpservletresponsewrapper?

0 Answers  


List the Different types of servlet?

0 Answers  


What is servlet in web technology?

0 Answers  


List some life cycle methods of a servlet.

0 Answers  


What is ServletConfig object?

0 Answers  


Categories