Session scope beans in multiple browser windows or tabs
843844Jul 1 2008 — edited Jul 7 2008Hi,
I'm not sure if this is normal and expected behavior, but I'm seeing data from JSF session scoped beans from different browser windows or tabs. Here's a simple test I did:
1) Created a sample JSF web app which has just 2 pages: first page is a form that takes an input into a session scoped bean and second page displays submitted input. Input is bound to a session scoped bean. (E.g. I just used sample "Kick Start" JSF application in Eclipse JBoss Web Tools).
2) Deploy it on Tomcat 6.0.
3) Opened the input page in first browser window/tab, supply "ABCD" as input text and submit the form - I see "ABCD" displayed as result.
4) Opened input page in a new browser window/tab, supply "PQRS" as input and submit the form - I see "PQRS" as result as expected.
5) Refresh first browser window/tab (of step #3). This time the output is "PQRS" again.
Shouldn't session scoped beans be isolated when accessed from different browser windows/tabs? I was expecting that a new tab/window would start a new session and thus session scoped beans will be isolated.
Thanks,
Balwinder