What are the difference between HttpServlet and
GenericServlets?
Answer Posted / 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 View All Answers
What is Request Dispatcher?
What do you mean by cgi in servlet?
Differentiate between the print writer and servlet output stream?
How can we achieve transport layer security for our web application?
Is java servlet still used?
What is the major difference between context parameter and context attribute?
How we can create war file in servlet?
Why do we need a constructor in a servlet if we use the init method?
What is difference between GenericServlet and HttpServlet?
What are the advantages of Servlet over CGI?
What is ServletContext object?
Can we use threads in Servlets?
Explain the difference between servletconfig and servletcontext in servlet?
How do you find out what client machine is making a request to your servlet
What is http servlet?