Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why are extending GenericServlet and why are extending
HttpServlet explain?

Answer Posted / mahesh

There are some reasons are exited they are as follows
-->GenericServlet is protocol independent where as HttpServlet is protocol dependent .
-->Due to the un implementation of http protocol GenericServlet will not provide any flexibility for the developers to specify different types of request at client mechine.
i.e. If you specify any type of request at client mechine like get,post,head.....when at server side GenericServlet able to process all this request as a normal request by calling service().
-->Due to the imlementation of HttpProtocol in HttpServlet,vl provide very good flexibility for the request at client mechine .
i.e. If we specify the request types like get,post...client mechine then HS vl execute doGet(),doPost().....respectivly at serverside.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a servlet be used to generate plain text instead of html?

918


What are the annotations used in servlet 3?

1005


What do you mean by cgi and what are its drawbacks?

942


What do you mean by mime type?

936


Explain the difference between a web server and a web container?

959


Which application server is best for java?

1038


Explain the concept of ssi ?

1006


If some new data has entered the database, explain how can a servlet refresh automatically?

1257


How does tomcat servlet container work?

1035


What is a generic servlet?

913


What is servlet mapping?

981


Describe in brief RequestDespatcher?

1086


What is the default http method in the servlet?

1252


How do you load an image in a Servlet?

1143


What are the difference between session and cookies in servlet? Explain

1018