This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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