Header Ads

How our custom servlet abide by Servlet Framework??

In my previous pages
1.http://www.askqtp.com/2012/01/how-to-write-html-page-to-invoke.html
2.http://www.askqtp.com/2012/01/how-to-call-servlet-from-html-using.html

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()


Powered by Blogger.