that is a simple problem of understanding: there is only one servlet object that is used by multiple threads. by having this in mind, your object variables are also shared, as would be static variables...
-----Original Message----- From: Sam Joseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 11:18 AM To: [EMAIL PROTECTED] Subject: Weird thread/security problem Hi, So I think this is a thread/security issue, but I am not sure. However it is definitely weird. I have been conducting some tests with multiple users. Various servlets are contacted that supply pages to each user, that include information such as user name etc. The version of tomcat in use is 3.2.1, and clearly I should upgrade to 3.2.3, but the tomcat is provided by my service provider so that might take some time. Anyway, the problem is that sometimes when two users are accessing the system simulatenously the information for one user will be displayed, briefly, to the other user. The system I have developed is quite complicated so I can't rule out that this is a problem with the code, but I'm not using static variables or anything that would allow this swap over. I mean each user has an object associated with them that contains their user name, but these are local variables to the servlet. Are there or have there been problems with tomcat that would explain this problem? I mean tomcat creates a separate thread for each servlet right? Different user, different thread, so their data shouldn't be available to each other. Am I overlooking something here? Should I be mailing to the developer's list? And on the same topic, does anyone know of any software that will simulate multiple users, without me having all my friends test the system. I mean some software (ideally free or shareware) that would simulate the stream of http requests, I guess I could hack something together myself, but if there's something already out there that would be great. Thanks in advance. CHEERS> SAM