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 is difference between GenericServlet and HttpServlet?
Does servlet have main method?
What is a servlet engine?
What are the uses of servlet
Can you call a jsp from the servlet?
When servlet is loaded?
give the syntax of doGet() and doPost()?
What is meant by servlet? What are the parameters of the service method?
Write all the phases defined in servlet life cycle?
What exactly are the functions of servlet?
what is the advantage of using Servlets over CGI programming?
What's the difference between servlets and applets?