SERVLET

SERVLET

Hi Everyone!

Hope all are good.............

Here i am sharing the article about the topic--"HttpServlet vs GenericServlet".


1.HttpServlet is protocol depends and GenericServlet is a protocol independent means HttpServlet can works with only http protocol and GenericServlet can work with any protocol.

2.GenericServlet is a member of Javax.Servlet package and HttpServlet is member of Javax.Servlet.http package.

3.GenericServlet is abstract class and which extends object class and implements servlet interface as well as ServletConfig and serializable interface

HttpServlet is child of GenericServlet and implement serializable interface.

HttpServlet is a child of GenericServlet and implements serializable interface in it.


Interface Servlet{

}


Interface ServletConfig{

}


class object{

}


class GenericServlet extends java.lang.object implements Servlet,ServletConfig{

}


OR

------

abstact class HttpServlet extends GenericServet{

}


4.GenericServlet only use the service() method for access the request and send the response in background but HttServlet we have the doget(), dOpost(), doTrace(), doDelete(), doHead() etc.

To view or add a comment, sign in

More articles by Amulya Kumar Panda

  • SERVLET CHAINING OR LOOPING

    Hi Everyone! Hope all are good..

  • SERVLET

    Hi Everyone! Hope all are good..

    1 Comment
  • Collection

    Hi Everyone! Hope all are good..

    2 Comments
  • Servlet life cycle

    Hii Everyone! Hope all are good..

  • #BookReading#Blog

    Hello Everyone! Hope all are good..

    2 Comments

Insights from the community

Others also viewed

Explore topics