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

Answers were Sorted based on User's Feedback



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

Answer / arun sharma

HttpServlet is Http Protocol Specific whereas Generic
servlet is protocol independent and as we know that on
world wide web only http protocol exists thats why most of
the servlets are developed using HttpServlet class. but id
we want proocol independent servlet in that case we develop
servlet using GenericServlet class.

Is This Answer Correct ?    13 Yes 1 No

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

Answer / 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

More Servlets Interview Questions

Explain servlet.

0 Answers  


What do you mean by session tracking?

0 Answers  


Explain the difference between GET and POST methods?

6 Answers  


Explain life cycle of a Servlet?

2 Answers  


Why is init() method is used in servlets?

0 Answers  


Which method of the httpservletrequest object is used?

0 Answers  


What is the capacity that doGet method can send to the server?

5 Answers  


how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file

0 Answers  


What is the use of httpservletresponsewrapper?

0 Answers  


Explain the lifecycle of a servlet?

0 Answers  


Can we write a constructor for a Servlet class ? if yes how ? if no why not ?

10 Answers  


What are the parameters of the service method ?

2 Answers  


Categories