0

Does Tomcat absolutely guarantee that sessions and browser windows have 1-to-1 relationship? Or it is possible to have multiple windows sharing one HttpSession, for example when pressing Ctrl-N?

Dims
  • 37,353
  • 77
  • 251
  • 478

2 Answers2

3

This is not server specific and can also not be controlled from the server side on. This is client (webbrowser) specific and can only be controlled by client side configuration (whenever available). By default, all modern browsers share the same cookies and thus also the session among all instances (all windows and tabs). Only in Chrome, you can open a new "Incognito" window using Ctrl+Shift+N which will create an entirely separate session.

See also:

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
1

The session is bound to the JSESSIONID cookie, so it'll be shared across the windows from the same browser. If you want two sessions you can use two browsers side by side, like Firefox and Chrome.

Emmanuel Bourg
  • 8,902
  • 2
  • 42
  • 71