Last Updated: February 25, 2016
·
6.04K
· toymachiner62

JSF Multiple Tab Session Scoped Bean

A common problem with JSF apps is that if you have a session scoped bean and you have multiple tabs open, the sessions are shared between all the tabs by default.

If you add the snippet below to your web.xml file, each tab stores it's session information therefore avoiding the common problem of tabs sharing the same session.

<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
</context-param>