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

Why do we have servlet listeners?

1124


What is cookies in servlet with example?

1224


What are the differences between the servletconfig interface and the servletcontext interface?

1255


What is cgi and what are its drawbacks?

1143


What is url encoding and url decoding

1225


What is webservlet?

1039


What is session tracking?

1266


What are the steps that are required to handle the multi-threading?

1153


What do you mean by servlet?

1193


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1079


What is ServletConfig object?

1246


How do you define a servlet?

1038


Difference between get and post in java servlets?

1077


Why session tracking is needed?

1085


What is servlet collaboration?

1191