> Hi,
> 1. I have used the code below to get hold of the cookie concept using
> servlets. I am using JWS1.1.3. I took ideas from Jason's book(its
explained
> really well). I am submitting a form using GET method . A servlet runs in
> response to form submission. This servlet checks whether a cooki
Hi,
1. I have used the code below to get hold of the cookie concept. I am using
JWS1.1.3. I took ideas from Jason's book(its explained really well). I am
submitting a form using GET method . A servlet runs in response to form
submission. This servlet checks whether a cookie with name "sessionid" i
Hi,
1. I have used the code below to get hold of the cookie concept using
servlets. I am using JWS1.1.3. I took ideas from Jason's book(its explained
really well). I am submitting a form using GET method . A servlet runs in
response to form submission. This servlet checks whether a cookie with nam
Thanks Craig for sharing ur experiances. I'll put more questions if I have
some doubt.
-mukul
>> The lines below which Craig has written seem to be quite important to
>> understand. But here I have a confusion. Say in doGet() method I write a
>> statement creating a session object [ HttpSession
Mukul Gandhi wrote:
> Hi,
> The lines below which Craig has written seem to be quite important to
> understand. But here I have a confusion. Say in doGet() method I write a
> statement creating a session object [ HttpSession session =
> request.getSession(true) ]. Lets assume sessions are manage
"Scheiderer, Stephan" wrote:
> [snip]
> SO, do I have to synchronize session object access??? (If a user
> makes 2 requests at one time...)
> Does that anybody of you? Is this really necessary?
>
I will offer a few brief comments about my own practices ... your mileage may
vary.
Hello Craig,
ÐÇÆÚËÄ, 1999Äê7ÔÂ8ÈÕ, you wrote:
CRM> Mukul Gandhi wrote:
>> Hi Craig,
>> u said regarding HttpSession object created in doPost() or doGet(). I know
>> these facts(Pl correct if I am wrong) -
>> 1. If many users are invoking the same servlet, then a Httpsession object
>> is created
Hello Mukul,
ÐÇÆÚÁù, 1999Äê7ÔÂ17ÈÕ, you wrote:
MG> Hi,
MG> The lines below which Craig has written seem to be quite important to
MG> understand. But here I have a confusion. Say in doGet() method I write a
MG> statement creating a session object [ HttpSession session =
MG> request.getSession(tru
Hi,
The lines below which Craig has written seem to be quite important to
understand. But here I have a confusion. Say in doGet() method I write a
statement creating a session object [ HttpSession session =
request.getSession(true) ]. Lets assume sessions are managed using
persistent cookies.
No
> Mukul Gandhi wrote:
>
> > Hi Craig,
> > u said regarding HttpSession object created in doPost() or doGet(). I
> know
> > these facts(Pl correct if I am wrong) -
> > 1. If many users are invoking the same servlet, then a Httpsession
> object
> > is created for each user. These session objects for
>
> The local variable comes into existence when the method gets
> called, but that
> does NOT guarantee that the object these variables refer to are
> thread safe.
> For example, if you have the following statement in your doGet()
> or doPost()
> method:
>
> HttpSession session = request.getS
On Tue, 6 Jul 1999, Kevin Jones wrote:
[ ... ]
> SingleThreadModel could be used to limit the number of threads in
> your servlet service method to one - this has limitations however -
> the most obvious being that you severely limit the scalability of
> your servlet, you will nearly always be be
Jeetandra Mahtani wrote:
>
> Hello,
> Can someone please confirm the following and maybe provide some insight to make my
> concepts thorough.
> If there are no instance variables and only local variables, one does not need to
>worry
> about different threads accessing the same variable, right?
R
." --Me
-Original Message-
From: Jeetandra Mahtani <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, July 06, 1999 5:44 AM
Subject: Can some explain/confirm
>Hello,
>Can someone please confirm the following and maybe provide some insight to
Jeetandra Mahtani wrote:
> Hello,
> Can someone please confirm the following and maybe provide some insight to make my
> concepts thorough.
> If there are no instance variables and only local variables, one does not need to
>worry
> about different threads accessing the same variable, right?
In
The best way to handle synchronization issues is to use a synchronized block
around the code accessing the shared resource.
Grant
-Original Message-
From: Jeetandra Mahtani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 06, 1999 8:53 AM
To: [EMAIL PROTECTED]
Subject: Can some explain/confi
> Hello, Can someone please confirm the following and maybe provide some
> insight to make my concepts thorough. If there are no instance
> variables and only local variables, one does not need to worry about
> different threads accessing the same variable, right? If only local
> variables are bei
> -Ursprungliche Nachricht-
> Von: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]Im Auftrag von
> Jeetandra Mahtani
> Gesendet: Tuesday, July 06, 1999 2:53 PM
> An: [EMAIL PROTECTED]
> Betreff
om: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Jeetandra Mahtani
Sent: 06 July 1999 13:53
To: [EMAIL PROTECTED]
Subject: Can some explain/confirm
Hello,
Can someone please confirm the following and maybe provide so
Mukul Gandhi wrote:
> Hi Craig,
> u said regarding HttpSession object created in doPost() or doGet(). I know
> these facts(Pl correct if I am wrong) -
> 1. If many users are invoking the same servlet, then a Httpsession object
> is created for each user. These session objects for different users
Hi Craig,
u said regarding HttpSession object created in doPost() or doGet(). I know
these facts(Pl correct if I am wrong) -
1. If many users are invoking the same servlet, then a Httpsession object
is created for each user. These session objects for different users are
existing in various threads
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, July 06, 1999 9:18 PM
Subject: Re: Can some explain/confirm
>On Tue, 6 Jul 1999, Nitin Mangtani wrote:
>
>> yah you are right if there are no instance variables and all are
>> local variables
Mukul Gandhi wrote:
> 2. Since local variables in class methods come into existence only when the
> method gets called, they will be created fresh for each method call.
>
The local variable comes into existence when the method gets called, but that
does NOT guarantee that the object these variab
On Tue, 6 Jul 1999, Nitin Mangtani wrote:
> yah you are right if there are no instance variables and all are
> local variables then you need not worry about synchronization
> issues.
I don't want to get into this too deeply, because it is not all that
simple and it has been discussed here before
1. If u are having instance variables i.e member variables of servlet class
and not implementing the SingleThreadModel interface then these variables
are shared during various invocations of the same servlet. To avoid
concurrent access of these variables u can either make the code thread safe
by u
yah you are right if there are no instance variables and all are local variables then
you
need not worry about synchronization issues.
Jeetandra Mahtani wrote:
> Hello,
> Can someone please confirm the following and maybe provide some insight to make my
> concepts thorough.
> If there are no in
Hello,
Can someone please confirm the following and maybe provide some insight to make my
concepts thorough.
If there are no instance variables and only local variables, one does not need to worry
about different threads accessing the same variable, right?
If only local variables are being used in
27 matches
Mail list logo