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 the uses of servlet and what is servlet chaining?
What is the difference between forward () and sendredirect () functions in servlet? Explain
Life Cycle of servlets?
What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?
What is the purpose of inter-servlet communication?
Explain session tracking and its importance?
What is the difference between doGet and doPost?
How to make servlet thread safe?
9 Answers Frisco Tech, InfoVista, WipSys Technologies,
How an Image can be loaded in a Servlet ?
How do you find out what client machine is making a request to your servlet
can we create more than ServletContext and ServletConfig in your application
What are life cycle methods of a servlet?