This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes instance persistance in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "instance persistance in servlets" Watch "instance persistance in servlets" New topic

instance persistance in servlets

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
what is the meaning of instancepersistance in the servlets topic
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13026
I am going to guess that you are talking about the fact that a servlet container creates a single instance of a servlet class and that instance may persist in memory for an indefinate amount of time and service any number of requests.
S Venkatesh
Ranch Hand

Joined: Jun 27, 2005
Posts: 464

Whenever u instantiate a servlet, only a single servlet instance persists in the web container for processing your requests. All your requests to this servlets is handled by the single instance of that servlet. This servlet is removed form your web container only when your application server is brought down or on redeployment.

Venkatesh S
It is sorta covered in the JavaRanch Style Guide.
subject: instance persistance in servlets
It's not a secret anymore!