First, static variables and static methods are two different topics.
Unless you have a real good reason to use them and you really know what you're doing, I'd avoid using static variables in web apps. Doing so can lead to some confusing behavior. [ September 29, 2006: Message edited by: Ben Souther ]
Ben is correct in that read/write static variables aren't well-suited to the web app environment. Final static variables used to defiend constants are a different matter though, and should be used to define constant values rather than hard-coding literals throughout the code.
You must be careful of that class or instance variables in servlets for thread safe. Container maybe send mutiple request to one servlet instance,so servlet (jsp also)is in multiple threads enviroment.