answersLogoWhite

0

Describe the life cycle of servelet?

Updated: 8/16/2019
User Avatar

Wiki User

15y ago

Best Answer

Each servlet has the same life cycle:

* A server loads and initializes the servlet

* The servlet handles zero or more client requests

* The server removes the servlet

(some servers do this step only when they shut down) == When a server loads a servlet, the server runs the servlet's init method. Initialization completes before client requests are handled and before the servlet is destroyed. Even though most servlets are run in multi-threaded servers, servlets have no concurrency issues during servlet initialization. The server calls the init method once, when the server loads the servlet, and will not call the init method again unless the server is reloading the servlet. The server can not reload a servlet until after the server has destroyed the servlet by calling the destroy method.

== After initialization, the servlet is able to handle client requests. This part of the servlet life cycle was handled in the previous lesson.

== Servlets run until the server are destroys them, for example, at the request of a system administrator. When a server destroys a servlet, the server runs the servlet's destroy method. The method is run once; the server will not run that servlet again until after the server reloads and reinitializes the servlet. When the destroy method runs, another thread might be running a service request. The Handling Service Threads at Servlet Termination lesson shows you how to provide a clean shutdown when there could be long-running threads still running service requests.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Describe the life cycle of servelet?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What phrase is used to describe the basic life cycle of all plants?

Alternation of generations is used to describe a plant life cycle.


Describe the life cycle of a volcano?

This is not a question.


How can you describe the life cycle of a star?

size and diameter


How do you describe maize life cycle?

i dont knoww


How would you describe the plant life cycle?

Plants have two stages in their life cycle, sporophyte stage and the gametophyte stage.


Describe the data life cycle?

first someone borns


Describe the dominant stage in the life cycle of a fern?

Diploid Sporophyte


What is the repeating series of events that describe life of a cell?

cell cycle


What is a waterfall model and describe it?

Waterfall is a system development life cycle


A life cycle is best describe as?

series of changes in the development of an organism


Which best describe the final in our sun's life cycle?

It will collapse and become a white dwarf


Describe the life-cycle of an ASPNet page?

I think the answer is: Page.PreInit Page.Init Page.Load Page.PreRender Page.Unload