Multiple tabs of a browser with multiple sessions in ZK

asked 2016-04-12 06:30:36 +0800

Srvna gravatar image Srvna
1 1

updated 2016-04-12 06:49:22 +0800

Hi team, Hybris cockpits run on ZK framework and we are trying to have an application in ZK which has multiple user sessions across multiple tabs of the same browser.

  Right now, as with all browsers, all tabs share the same JSESSIONID in the cookie. We tried by changing the session-config tracking mode to URL in web.xml of the application which did bring the JSESSIONID to URL and remove the cookie but the Executions object had the current session set to NULL and hence we are unable to proceed.

   It will be helpful to know if this option of having multiple user sessions across multiple tabs are really feasible in ZK framework.
delete flag offensive retag edit


Did you try disabling the cookies? ZK can run without them normally so each new tab should have a new session.

chillworld ( 2016-04-12 10:04:02 +0800 )edit

Hi chillworld, Thanks for the response. We have already tried this. Disabling cookies do not let us to login. Executions object doesnt have session tied to it, hence Execution.getCurrent() returns null and hence we are unable to proceed

Srvna ( 2016-04-12 20:46:58 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-04-12 08:03:54 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Srvna,

The following is just an idea:

Create an collection of logged in users where you will add the users, and add that to the session.

Then each time you log in, check if the session still exists and if that user is in the session collection.

Probably you will also have to implement a custom timeout per user.

Check out:


Best Regards,


link publish delete flag offensive edit

answered 2016-04-19 10:22:52 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6

updated 2016-04-19 10:24:45 +0800

Hello again!

After some attempts, i arrived to the following conclusion:

  1. Hybris cockpits are using iframes and popup windows: it will be difficult to handle a "different tab" session from a child iframe or window
  2. I think it is not a matter or ZK capabilities but it is a more general matter of session handling: you are not the first one trying to achieve this and you can find several discussions on google
  3. In particular... i think this one is interesting: http://stackoverflow.com/questions/368653/how-to-differ-sessions-in-browser-tabs/11783754#11783754

There are some hints there about HTML5 sessionStorage that might help you, or the one marked as "Occam's approach" even more.

My conclusion is that having "an application in ZK which has multiple user sessions across multiple tabs of the same browser" is a bad idea at start and i am not able to think about a possible scenario where such a requirement might be fundamental... it might sound idiotic... but maybe you can define several different 3rd level domains like admins.yourdomain.com and customers.yourdomain.com?

Good luck anyway! Gio

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2016-04-12 06:30:36 +0800

Seen: 48 times

Last updated: Apr 19 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More