tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Weidemann <>
Subject Re: tomcat output gets mixed up for different requests
Date Tue, 03 Aug 2004 09:00:35 GMT
QM wrote:
> Two clients' content getting mixed up with one another: sounds like
> misuse of a shared variable, such as an instance variable inside the
> servlet class, use of the servlet context for client data, etc.

I checked all variables and declarations and I'm sure that there are no
variables being "misused".

For debugging purposes I added a System.out(this); at the beginning of
the doGet() method of the servlet class.

No matter which client is calling the servlet, the output of
System.out(this); is always the same. The output looks like this:


So it seems that Tomcat does not spawn a new servlet for a new request,
althought my web.xml file contains:


With every client calling the same Method it seems very likely that the
output is getting mixed up.

Adding a *synchronized* in front of the doGet() method, makes the
problem disappear, but also makes the Tomcat very slow.

Any help will be greatly appreciated,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message