Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, 10 January 2017

What is difference Between GenericServlet and HttpServlet ?

Here we will learn all the differences between HttpServlet and GenericServlet.

HttpServlet
GenericServlet
HttpServlets are protocol dependent (can only handles HTTP specific protocol).
HttpServlets are protocol independent (can handles any protocol).
Javax.servlet.http.HttpServlet is used to define the HttpServlet .
Javax.servlet.GenericServlet is used to define the GenericServlet .
It doesn’t override the service() method. It override the doGet() and doPost() method.
It override the service() method.
It is defined in javax.servlet.http; package.
It is defined in javax.servlet; package.
All classes and interface defined in this package (javax.servlet.http) are protocol dependent (HTTP).
All classes and interface defined in this package (javax.servlet) are protocol independent.
HttpServlet provide some method like doGet(),doPost(),doPut(),doDelete(),doTrace(),
doHead(),doOption()
GenericServlet only provide service() method.

Some Similarities between HttpServlet and GenericServlet are as follows :

HttpServlet
GenericServlet
It’s an Abstract Class.
It’s an Abstract Class.





      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.



Share this Blog with yours Friends !!

No comments:

Post a Comment