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

Difference between get and post in java servlets?

1024


What is string tokenizer?

1058


Why do we have servlet wrapper classes?

1054


What is servlet and how it works?

954


What are the supporting protocol by HttpServlet ?

1174


What is a java servlet?

1049


What is servlet initializer?

956


Explain the concept of ssi ?

1034


What do you mean by request dispatcher in servlet?

1100


Explain the servlet filter.

971


Explain the working of service() method of a servlet.

947


What is http servlet in java?

1049


What is the difference between using getSession(true) and getSession(false) methods?

1025


Explain the lifecycle of a servlet?

949


What is servlet in web technology?

1029