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 |
Explain the steps involved in placing a servlet within a package?
What is meant by session? Tell me something about httpsession class?
What are the different ways we can maintain state between requests?
init() method of servlet loaded by?
why are using HttpServlet in realtime projects and why are not using Genericservlet
What are important features of Servlet 3?
How do you get the ip address of the client in servlet?
What is the use of httpservletresponsewrapper?
List the Different types of servlet?
What is servlet in web technology?
List some life cycle methods of a servlet.
What is ServletConfig object?