I feel the following info may also be important in finding a clue to the
problem :
Servlet Container : jswdk-1.0.1
Clients : IE 5.0 on same machine
Platform : Win NT 4.0
Bhaskar Varanasi
IIC Technologies Pvt. Ltd.,
Hyderabad.
http://www.iictechnologies.com
Alternate e-mail :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin
Mukhar
Sent: Thursday, October 12, 2000 7:32 PM
To: [EMAIL PROTECTED]
Subject: Re: A question about the fundamentals!
Vijaya Bhaskar Varanasi wrote:
>
> I have a simple html form submitting login name and password to a simple
> servlet. The servlet validates the password and tells the user whether he
is
> logged in or not.
>
> When I open 4 browser windows (all of IE 5.0 on same m/c) and submit the
> parameters at the SAME time, three browser windows are blank (no response
> info is displayed in them) and one browser window displays four messages
> corresponding to all four attempts to login.
>
> Can we related this behaviour related to what has been discussed here ?
But,
> we do not have any 'dynamically' changing variable defined out side the
> doPost method!. All the servlet does is to respond to the client with
> relevant info whether the user is logged-in or not !
Yes, this behavior is the same problem. You probably have two problems
here.
If you are running four instances of IE on the same machine, these four
browsers are probably identified by the server as being part of the same
session. You can verify this by examining the session id in the servlet.
Make a request from a browser, check the session id. Make a request from
a different browser window from the same machine, check the session id.
Are they the same? (I think they will be.) If they are the same, then
you need to change your testing strategy to use different machines to
test concurrent requests.
The behavior of three browsers being blank and one browser showing four
messages sounds very strongly like a problem with concurrent requests
messing with the same variable. You claim that "we do not have any
'dynamically' changing variable defined out side the doPost method."
Yet, all four responses are going to the same output stream. Usually
this indicates that you are using some servlet instance variable for the
output stream rather than a method local variable. The other possibility
in your case is that you are correctly using a method local variable to
reference the output stream, but that because you are running four
browsers from the same machine that this is causing the problem.
K Mukhar
___________________________________________________________________________
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