posted 23 years ago
Hi,
By default, a servlet normally has only one servlet instance per servlet definition. Even if we assume or guarantee that only one servlet instance is available to service requests, concurrent requests will spawn multiple threads, so static servlet variables are not thread-safe.
A servlet that implements SingleThreadModel is usually pooled by the container so this situation is not thread-safe for static servlet variables either.
-anthony
[ March 22, 2002: Message edited by: Anthony Villanueva ]