Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is servlet ?

    • 0
    • 1
    • 1
    • 2
    • 0
    • 0
    • 0
    • 0
    • 381
    Comment on it

    Servlet is very powerful server side scripting language. It is a class which basically handle network request-response model. It is very powerful as we had earlier like CGI.

    Basic Request-Rsponse Model

    When browser send http request to java web server(like Tomcat, Jeety) then server pass the request to specific servlet , which process the request and perform task and revert response to the browser.

    Where Servlet Runs ?

    Servlet runs under web server. We can say that servlet container . Example-

    1.Tomcat
    2.Jeety

    Servlet Life Cycle

    Servlet follows certain life cycle which is managed by servlet container. Servlet life cycle is as -

    1. Servlet Initialization -By calling the init () method.

    2. Process Request - calls service() method to process a client's request.

    3. Servlet Termination -The servlet is terminated by calling the destroy() method.

    4. Finally, servlet is garbage collected by the garbage collector of the JVM.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: