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

what is SSL?

3 Answers  


What's the difference between servlets and applets?

0 Answers  


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

0 Answers  


Explain the features are in servlet 3?

0 Answers  


can u give some realtime example in ploymorphism? and inheritance?

11 Answers   SolutionNET,






Can you call a jsp from the servlet?

0 Answers  


How many objects of a servlet is created?

0 Answers  


What is the difference between encodeRedirectUrl and encodeURL?

0 Answers  


Servlet is pure java object or not?

0 Answers  


Explain their methods? Tell me their parameter names also have you used threads in servlet?

0 Answers  


Is dispatcher servlet a singleton?

0 Answers  


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

0 Answers  


Categories