Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets HttpSession

 
Roy kachouh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I ensure that when a user opens up a new browser window, my servlet will create a new corresponding HttpSession.
Thanks in advance.
Roy
 
Chris Smith
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. Sorry.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"roy rogers"- two things...
1st thing:
Welcome to the JavaRanch! We like to keeep a nice professional image here at the JavaRanch (despite the big one-eyed moose). Please adjust your displayed name to match the JavaRanch Naming Policy.
You can change it here.
2nd thing:
just to expand on Chris' reply -- it all depends on the browser and HOW the user creates this new window. If you open multiple Internet Explorer windows by double clicking on the IE icon -- each window will have a different Session ID. However if you use Ctrl+N to open a new window -- the two will have the same Session ID. No matter how you open a new Netscape window -- the windows will share a Session ID.
It's a browser issue, you have no control over it.
Hope that helps... Thanks in advance for fixing your displayed name and again welcome to the JavaRanch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic