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 |
Why do you use session tracking in httpservlet?
What do you mean by annotations in servlet?
how many jsp scripting elements are there and what are those?
Can we use servlets in JavaScript?
List the Different types of servlet?
what is the control flow in servlet when we send a request?
What is called servlet container?
what are binding listners?
What are life cycle methods of a servlet?
How can a servlet refresh automatically if some new data has entered the database?
3 Answers Citi Bank, CitiGroup, IBM, Satyam,
Explain url encoding?
How multiple simultaneous requests can be handled by servlets?