Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Session scope beans in multiple browser windows or tabs

843844Jul 1 2008 — edited Jul 7 2008
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2008
Added on Jul 1 2008
3 comments
796 views