Generally yes. Most containers provide separate class loaders for each web application. This will cause the class to be loaded several times when used by multiple applications, and therefore lead to multiple instances of the static variable.
Note Java language specification for reference:
At run time, multiple reference types with the same binary name can be loaded simultaneously by different classes. These types may or may not represent the same type of declaration. Even if two of these types present the same type of declaration, they are considered distinct.
In conclusion, there will be several instances of static variables, unless the classes are loaded only once by the parent class loader and never loaded anywhere by the other class loader.
Vineet reynolds
source share