How our custom servlet abide by Servlet Framework??

    Share and Enjoy !

    In my previous pages
    1.https://www.techtravelhub.com/2012/01/how-to-write-html-page-to-invoke.html
    2.https://www.techtravelhub.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.

    Ads code goes here

    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 Comment

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