I need know the concept of instance servlet

i knowthe servlt instance whenthecomming request or on load start upbut i needimprove ofthe servlet istance may be have in our application more than one ofthe instance servlet (i mean one servlet more than one instance ) orin our servlet have one instnace ?

please i need to know for thatcouase this improve for starting to programming he web aplication

thanks

[382 byte] By [javaskilleda] at [2007-11-27 3:35:55]
# 1
nothing help in this subject ?where the experince programmer,developer?thanks
javaskilleda at 2007-7-12 8:39:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

We said above that servlets persist between requests as object instances. In other words, at the time the code for a servlet is loaded, the server creates a single class instance. That single instance handles every request made of the servlet. This improves performance in three ways:

It keeps the memory footprint small.

It eliminates the object creation overhead that would otherwise be necessary to create a new servlet object. A servlet can be already loaded in a virtual machine when a request comes in, letting it begin executing right away.

It enables persistence. A servlet can have already loaded anything it's likely to need during the handling of a request. For example, a database connection can be opened once and used repeatedly thereafter. It can even be used by a group of servlets. Another example is a shopping cart servlet that loads in memory the price list along with information about its recently connected clients. Yet another servlet may choose to cache entire pages of output to save time if it receives the same request again.

Not only do servlets persist between requests, but so do any threads created by servlets. This perhaps isn't useful for the run-of-the-mill servlet, but it opens up some interesting possibilities. Consider the situation where one background thread performs some calculation while other threads display the latest results. It's quite similar to an animation applet where one thread changes the picture and another one paints the display.

but you can created for each request the instance servlet through

implements SingleThreadModel

i think this is concept of instanced of servlet

thanks

javaskilleda at 2007-7-12 8:39:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...