0

How to create different session for different tabs in same window?

I am trying but it is always using same session throughout different window in Struts2 app?

I have changed cookies two but session remain same.

Its struts2 java app. thanks

user1126046
  • 37
  • 1
  • 2
  • 9

2 Answers2

0

@user1126046 It's Not Possible,
If you want to create Different session for different tabs in same window, you need to force user to use a single instance of your application by writing URLs on the fly(different URLs for the same instance(URL encoding), SessionID won't work in this case).
Unless you want to pass data through GET or POST with every request, you can't do this.

But: we may achieve by assigning a Window-Id(using Apache MyFaces Orchestra, Spring MVC, jsf), Refer this answer for more info.

Community
  • 1
  • 1
Chandra Sekhar
  • 16,256
  • 10
  • 67
  • 90
  • can you give some link or example of Apache MyFaces Orchestra..as there is no war file on following link?Doing google in case if i get will update you? – user1126046 Apr 17 '12 at 10:06
  • @user1126046 check [this link](http://struberg.wordpress.com/2011/11/13/solving-the-browser-tab-problem) – Chandra Sekhar Apr 17 '12 at 12:14
0

I don't really know from your question exactly what it is you are trying to accomplish, but if you want something sort of like "different sessions" per tab, you can look at this http://code.google.com/p/struts2-conversation/.

Its a plugin that I maintain myself. I'm doing frequent releases, but they are backwards compatible. But again, I'm not sure exactly what you need, so I don't know that this is adequate or not.

rees
  • 1,566
  • 1
  • 12
  • 19