File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session object

 
sagar shiraguppi
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating session object in my servlet program ,, but when I make a request to a servlet by opening 2 browser it is taking as only one session object.. It is happening only in my latop, in other places if I make a request from 2 browser 2 session objects are getting created, I am using session.getId() to check the ID of session,

Please help me thanks
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Internally JSESSIONID cookie is passed in each request to Web Server to identify the session object exclusively allocated for the Client...

If you open a new window or new tab from the existing browser parent window, same JSESSIONID is passed... So it will refer to the same session object...

When you do open a separate new Browser window, a new request is created to the web server and different JSESSIONID is created by Web server and sends as Cookie to the Client...Then, JSESSIONID cookie is sent at subsequent requests to the Server
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Different browsers handle new windows differently; some create new sessions, some don't, some are configurable to do either.
 
sagar shiraguppi
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sagar shiraguppi wrote:I am creating session object in my servlet program ,, but when I make a request to a servlet by opening 2 browser it is taking as only one session object.. It is happening only in my latop, in other places if I make a request from 2 browser 2 session objects are getting created, I am using session.getId() to check the ID of session,

Please help me thanks

I agree with David. But, why is this? Is this really happening?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is happening only in my latop only


whats your Laptop company and its configuration ?? just kiding .

 
sagar shiraguppi
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it is happening with only my laptop, i tried with other laptop who are running on Vista, but only in my laptop this problem, other than this program no issues with any other program, I m still not clear why not only one session is created when I open two browser of same vendor and send a request, If I open say one chrome browser and other IE and sends the request two session are getting created understandably.. But issue is with same two browser and only one session object..
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic