tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bonnin" <s...@libero.it>
Subject Re: Shared Variables
Date Wed, 25 Jul 2001 13:01:01 GMT
ok ok I have solved the problem ....

Thanks...

----- Original Message -----
From: "Dmitri Colebatch" <dim@bigpond.net.au>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, July 25, 2001 2:05 PM
Subject: Re: Shared Variables


> Hi,
>
> Variables in what sense?  As in variables in a servlet?  They are suppose
> to be shared.  It is up to you to ensure that your servlet is thread safe
> (there will only be one instance of a servlet created by Tomcat).  If you
> want to store a variable in the session, the use something like:
>
> HttpSession session = request.getSession(true);
> session.setAttribute("variable", "mouse");
>
> Is this what you're asking about?
>
> cheers
> dim
>
> On Wed, 25 Jul 2001, Stefano Bonnin wrote:
>
> > Hi,
> >
> > I have noticed that when I start my application under Tomcat 3.2.1 all
the
> > variables are shared!!!! If I access for the first time and I set for
> > example Name="mouse", at the second access (another session!) the Name
> > variable is equal to "mouse"??? Why? Is a Tomcat bug?
> >
> > Help me!
> >
> > Thanks.
> >
> >
> >
> >
>


Mime
View raw message