How our custom servlet abide by Servlet Framework??

Share and Enjoy !

In my previous pages

I have shown how to write servlet for our need.
But we need to know the internal architecture that how it is fitting with global servlet architecture.

Look at the picture

So whatever servlet we need as per our need that extends to HttpServlet class.It is an abstract class which gave freedom to write HTTP Servlets.Now this class also extended to GenericServlet class with facility to Handel HTTP requests.So our servlet inherits all the methods (as per the picture 4) .
This is how our simple servlet is actually fitting into servlet framework arena.

The methods are–

  • init()
  • doGet()
  • doPost()
  • getServletInfo()

Share and Enjoy !

READ  How to write HTML page to invoke a servlet

Leave a Reply

Your email address will not be published. Required fields are marked *