If there is only one servlet, then yes, the variable is implicity static.
> If user A requests my servlet and changes the temp to true, will
subsequent
> users see a value of true?
YES! :-)
----- Original Message -----
From: "Todd Mytkowicz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 4:08 PM
Subject: Non static global variables
> Hello all,
>
> In my servlet, I create an instance variable as such...
>
> private boolean temp = false;
>
> ...
>
> An instance of this servlet is created the first time the servlet is
called.
> My understanding is that this variable is only initialized that first
time.
>
> Is this temp variable implicitly static? ie, if one user changes the
> variable, will other servlets see that change?
>
> In more general terms, I want this variable to act as a global variable
with
> a seperate value to each request.
>
> If user A requests my servlet and changes the temp to true, will
subsequent
> users see a value of true?
>
> Thanks for the help.
>
> Todd Mytkowicz:
> [EMAIL PROTECTED]
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html