Life Cycle of servlets?

Answer Posted / prashant

1> Server loads the servlet.
2> Server creats one or more instances of the servlet
3> Server calls the init()method of each Servlet instance
4> Servlet request is received
5> Servlet service()method processes the request
6> Servlet calls the service()method of the servlet instance
7> Servlet service()method then process the request & send
the output to the client
8> Servlet waits until next request is received (if yes
continue from step no-4 )
9> Servlet is unloaded by the server by calling the destroy
()method

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if we pass negative value in load-on-startup?

812


What is Client-Server Computing?

1900


What is the difference in between the httpservlet and generic servlet?

612


What is difference between PrintWriter and ServletOutputStream?

780


How the typical servlet code look like ?

639






What is a java servlet?

558


How to commuincate between an applet and a servlet?

594


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

619


Why are http servlets used in programming?

552


Why doesn’t a servlet include main()?

564


Explain the difference between a web server and a web container?

521


What is the difference between genericservlet and httpservlet

594


What do you mean by session tracking and also explain its techniques?

504


Define the life cycle of a servlets.

578


Describe servlet?

585