Matthew Brown wrote:But what are they doing with it? That's what matters. There's no single answer to how to make a variable thread safe without some more context.
For instance, if the variable is never being changed, then as Tim says it's already safe. However, it might be referencing an object - in which case the question is, is that object thread safe?
If the servlets are updating the value of this static variable, then you've got the possibility of conflicts. But how you fix that depends on what is happening.
The servlets will be adding values to it. (Actually its not really servlets but jersey resources will be adding to it)