Servlets are multi-threaded. That means that a single servlet instance can be called from multiple threads (created for serving multiple users) simultaneously. And that means that the servlet code needs to be thread-safe, e.g. one needs to be very careful when using instance variables.
The SingleThreadModel was an attempt at side-stepping this problem by telling the servlet container: "this servlet code is not thread-safe, so if you have two simultaneous threads wanting to execute it, either create a second instance of the servlet, or wait until the first instance is finished executing".
As it turned out, this by itself was not sufficient to guarantee thread-safety. As a consequence, the interface has been deprecated. Any servlets you write need to be written in a thread-safe manner. In the abstract that means: Any access to shared mutable state needs to be synchronized. In practice it means to not use instance variables that can change during the lifetime of a servlet. That by itself is not sufficient, but it is the source of most thread-safety problems.
Joined: Jan 29, 2006
HI and Thanks Ulf Dittmer .Understood it.
subject: Difference between Single and Multi Thread Model