Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

My Experience Servlet And Its Life Cycle.

Discussion in 'General Programming Discussions' started by krishatg, Mar 14, 2016.

  1. krishatg

    Yellow Belt

    Jan 16, 2016
    +14 / -0
    Servlet is a java program code that generates the HTML pages as output. They are the small program that execute on the server side and dynamically extends the functionality of web server.

    Advantages of using Servlets:
    • Servlets are platform independent as they are written in java.
    • Sevlets are executed within the address space of webserver.
    • Full functionality of java class libraries are available to servlets.
    Servlet life Cycle:
    • Browser first generates HTTP request for URL.
    • Request is then received by server and maps to the particular servlet.
    • Server then invoke init() of servlet.It is invoked to load servlet into the memory.
    • Server invokes the service() method of servlet to process the http request. It is invoked each time the browser requesr for service.
    • Finally the server may need to unload the servlet from memory which is done by using destroy() method.

Share This Page