tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: is there only static objects in Tomcat?
Date Tue, 18 Jun 2002 22:01:51 GMT

On Tue, 18 Jun 2002, Ray Letts wrote:

> Date: Tue, 18 Jun 2002 15:00:23 -0700
> From: Ray Letts <>
> Reply-To: Tomcat Users List <>,
> To: Tomcat Users List <>
> Subject: is there only static objects in Tomcat?
> I read a previous thread where someone stated that: "you know that
> Tomcat creates all objects as static?"

There is no such thing as "creating an object as static".  You might be
confusing this with creating a single instance of a servlet, which is
shared across all requests to that servlet.

Fundamentally, this means you cannot use static or instance variables in
our servlet class to maintain per-request state information.  Use local
variables in our methods, or pass things around as request attributes, in
order to deal with this.


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

View raw message