Hi David,

1. How do you block a second request from a servlet (synchronize it's methodes?)

2. Is there really no way to differnetiate between the two browser instances?
    (a second instance = Netscape Browser: 'File' -> 'New' -> 'Navigator Window')

3. So it will be impossible to handle more than one request from the same user!
    -> because all browser instances work with the same cookie-information
      --> so the servlet seems to handle only the last request!


if anybody knows to handle this, please help me out here.

thanks martin


David Ezzio wrote:

> Martin,
>
>    Cookies are, I believe, unique to the machine or at least the
> directory where the browser is installed.  So multiple instances of the
> browser from the same install share the same cookie.
>
>    On the other side, you don't need multiple browsers to generate
> multiple HTTP requests that overlap.  Simply hit the reload button
> twenty times and your servlet will be running 20 threads all trying to
> serve the same stuff for the same session to the same browser.
>
>    This second situation can be prevented by blocking subsequent threads
> from entering the session until the thread that has entered has exited.
> But in your case, because of the cookie thing, I'm not sure that would
> make a difference in behavior for you.
>
> David
>
> Martin Eberle wrote:
> >
> > !! A user opens two instances of the same browser !!
> >
> > So there can be two ore more call's to a servlet (with the same
> > sessiondata) !!
> > ->That means: What about the members of helper-classes ?
> >  -> how can I synchronize this situation ?
> >
> > Specific problem:
> > My servlets serve as an ecommerce-system:
> > 1. To navigate through the resultset of a database-query I set a cookie
> > (identifies set of products) to the client
> > 2. The user post two simultanious querys -> the slower query-process
> > sets the final cookie.
> > 3. So the user navigate in both browser windows throw the same set of
> > products!
> >
> > thanks martin
> >
> > ___________________________________________________________________________
> > 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

Reply via email to