wood burning stoves*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

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
 
jQuery in Action, 2nd edition
 
subject: how does jsp create session when there're two requests coming simultaneously
 
Similar Threads
session handling from different tabs of same browser
Two sessions started simultaneously, updating an object
Tabs and sub-tabs problem
session management in different tabs in same browser
(Servlets, Thread safety) Protecting the session and context state