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...

What is Generic Servlet and how it is different from Http
Servlet?

Answer Posted / qim2010

Both these classes are abstract but the differences are

A GenericServlet has a service() method to handle
requests.
The HttpServlet extends GenericServlet and adds support
for HTTP
protocol based methods like doGet(), doPost(), doHead()
etc. All
client requests are handled through the service() method.
The service method dispatches the request to an appropriate
method like doGet(), doPost() etc to handle that request.
HttpServlet also has methods like doHead(), doPut(),
doOptions(),
doDelete(), and doTrace().


GenericServlet is Protocol independent. GenericServlet is
for servlets
that might not use HTTP (for example FTP service).
But HttpServlet is protocol dependent (i.e. HTTP).

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you deal property files in servlet?

1046


What is the use of servletconfig interface?

1026


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

1166


What is the use of httpservletresponsewrapper?

952


What is the element?

1037


Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com

2168


What is a cookie What is the difference between session and cookie

1060


How can the referrer and the target urls be used in servlet?

989


What do you mean by the servlet chaining?

1059


Which exception is thrown if the servlet is not initialized properly?

1011


What is lazy loading and what is Generic Servlet Class?

1060


What do you understand by mime type?

977


What do you mean by annotations in servlet?

1051


What is servlet invoker?

1025


How can we implement a jsp page?

1126