File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how does jsp create session when there're two requests coming simultaneously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how does jsp create session when there Watch "how does jsp create session when there New topic
Author

how does jsp create session when there're two requests coming simultaneously

drac yang
Ranch Hand

Joined: Apr 19, 2013
Posts: 61
how does jsp create session when there're two requests coming simultaneously from the same client browser(maybe one tab maybe two tabs)?

i ask this question because it is said jsp could solve DuplicateSessionException in flex.

http://www.alexglosband.com/2010/03/avoiding-duplicate-session-detected-errors-in-lcds-and-blazeds/#comment-3498

if so, jsp would create same session(with same session id) for the two requests coming simultaneously? thanks.


science belief, great bioscience!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30938
    
158

Yes, Servlets/JSPs will "reuse" the existing session when the second request comes in.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how does jsp create session when there're two requests coming simultaneously