Struts 1 action classes are multithreaded, which means you must code them as thread-safe. In a thread-safe object, the only instance variables are those that do not change from one user to the next. All other variables should be local variables within methods.
For example, if you have a Logger class that writes to a log, it would be fine to make this an instance variable since the same instance of this class could safely be used by multiple users. However, if you have a variable called
balance representing an individual user's account balance, it would be disastrous to make this an instance variable because one user could place a value in the variable and in the next
thread another user could pick up the same value.