Hi, Is there any difference between Static variable and intance variable (both are int, example given in the Orielly Book). But since I am using only one instance both are behaving the same. If i user SingleThreadModel only it behaves differently as static is public to all instances and instance variable is for a particular instance only.
posted 14 years ago
It is possible to have multiple servlet instances even if you are not implementing SingleThreadModel if you have multiple registered names for the same servlet class. In which case, the normal differences between static and instance variables become significant. -anthony