What are the difference between HttpServlet and
GenericServlets?
Answers were Sorted based on User's Feedback
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 |
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 |
What are important features of Servlet 3?
What is the role of the webserver?
What are the phases of the servlet life cycle?
What are common tasks performed by Servlet Container?
Why do we have servlet wrapper classes?
What are all the protocols supported by httpservlet?
How do u authorize and authenticate without <auth> of web.xml
how this statement works..? public void service(HttpServletRequest request,HttpServletResponse response)
Differentiate between the print writer and servlet output stream?
Difference between web container & web server........... Difference between web server & application server?????????
How do you track a user session in servlets?
Why is a constructor needed in a servlet even if we use the init method?