why are using HttpServlet in realtime projects and why are
not using Genericservlet

Answer Posted / prakash

Generic servlet is a abstract class which is not
implementing service() method,to serve the client requests
service method has to execute. and also generic servlet is
containing all general statements,and methods which are
changing by protocol wise.

But HttpServlet is a Http protocol specific class,it is also
one abstract class,eventhough all methods got implemented it
is qualified as abstract class to restrict the creation of
objects. Httpservlt class is implementing service() method
to serve the client requests.
so we are using HttpServlet in realtime projects.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are common tasks performed by Servlet Container?

763


What is cookies in servlet with example?

518


What are the advantages of Servlet over CGI?

662


What are the steps involved in placing a servlet within a package?

584


Explain servlet life cycle?

613






How to get the IP address of client in servlet?

623


What is http servlet?

579


What is meant by a servlet?

604


What's the difference between authentication and authorization?

546


What are the mechanisms used by a servlet container for maintaining session information?

562


What is MIME Type?

661


What exactly are the functions of servlet?

597


What are the two important api's in for servlets?

588


If my browser does not support cookie, and my server sends a cookie instance what will happen?

647


How a servlet is unloaded?

589