Configure user session persistence
With the persistent session state feature, portal users can resume and continue a previously interrupted working session at the same state where they left the session. When the user logs out or the session times out, the portal stores the current navigational state into the database. The administrator can give users the option to resume the navigational state of their last session when logging in again. When the user chooses to resume the last session, the navigational state stored previously is restored, and the user can continue working where the user stopped before.
Example: A user logs in and maximizes some portlets. Afterwards the user logs out. When the user logs in again, all of the previously maximized portlets are still maximized.
Note: Only the server side aggregation (SSA) rendering mode supports user session persistence to the full extent. Do not use the session persistence feature in combination with the client side aggregation (CSA) rendering mode of the Page Builder theme. If you use the session persistence feature with CSA, users will not have a consistent experience as to when and whether their session is persisted or not. CSA reduces the amount of data sent between the client and the server. Therefore the current navigational state of the user session is synchronized with the server only by specific user actions and is not persisted and restored by the server continuously.
Session settings stored by the portal
After a user logs out or the session times out, the portal stores the complete navigational state into the database.
- Portlet states:
- Normal
- Minimized
- Maximized
- Portlet modes:
- config
- edit_defaults
- edit
- view
- help
- Page selection:
- The last page that was active before the user logged out.
Resuming the session state is only possible if either the portal theme login link or WebSphere Application Server TAI based authentication is used to login to the portal. Whenever a URL is directly used to login or address a resource, this will overwrite the complete session state that is to be resumed and address the named resource with the default states and modes for its portlets. For example, this occurs when users use ../wps/myportal/ or ../wps/myportal/name/ for a URL mapping or friendly name
User option during login
If the portal administrator has enabled the resume option for users, the login page displays a check box Resume last session. If the user selects this check box, the previous session is resumed. Otherwise the previous session is not resumed and the user starts as if logging in for the first time.
How administrators define persistent session options
Administrators can configure the persistent session behavior by setting the following properties:
- persistent.session.option
Whether the login portlet displays a check box that enables the user to decide whether to resume the session or not.
- persistent.session.level
Which navigational state information should be restored when resuming the session.
- timeout.resume.session = (false)
Whether resuming the session after a session timeout requires user authentication. The default value is false. If this property is set to false and the user tries to continue working after a session timeout, the portal shows an error message stating that the session has timed out and the user has to log in again. If you set this property to true, the portal ignores the session timeout and does not show the error message. The user can resume the previous session without authentication and continue to work. In both cases the previous session is resumed according to the setting of the persisted.session.level
Administrators set these properties in Configuration Service.
Give users the resume option
Portal administrators can define whether users have the option to resume their last session during login. They do this by setting the property persistent.session.option in the Configuration Service. They can configure the property to one of two settings: 0 or 1.
The two persistent session option values have the following effects:
persistent.session.option = 0:
This means that the user does not have the choice to resume the last session or not.
persistent.session.option = 1:
This means that at login the user is presented with the option to resume the session in the navigational state of the last session.
The default setting is 0, that is, users have no option to resume their last session.
The defined session preservation settings as described under Set the session resume level for users are in effect, independent of whether the administrator has given users the resume option.
If you give users the resume option, you should set the session resume level to 1 or higher. Otherwise the persistent.session.option property has no effect.
Set the session resume level for users
The session resume level specifies which navigational state information should be resumed (if any) when the respective user logs in again. Portal administrators can configure the session resume level by setting the property...
persistent.session.level
We can configure the property to one of three predefined values:
- 0
- 1
- 2
The user to benefit from the setting, give users the resume option as described under Give users the resume option . However, the defined setting is in effect, independent of whether you give users the resume option.
The four persistent session level values have the following effects:
persistent.session.level = 0:
No persistent session state at all applies to the user session. During logout or session timeout no navigational state information is stored into the database. After a login no navigational state is restored.
persistent.session.level = 1:
The portlet states and the portlet modes are stored in the database and are restored to the user session when the respective user logs in again.. For example, all maximized portlets are still maximized. However, no information about the last active page is stored. This means that the user starts with the default page after a login.
persistent.session.level = 2:
Maximum level of persistent session state. The complete navigational state information is stored. This includes portlet-specific navigational state (portlet states, portlet modes, and render parameters) as well as page selection information mentioned above. In contrast to persistent session level 1 the session now starts with the last page that was active before the user logged out.
persistent.session.level = 3:
Users will stay on the login page after logging in, rather than being redirected to another page.
The default setting is 0, that is, no persistent session state is stored or restored.
The following table gives an overview of the settings and their effect on the user session when the user logs back in to the portal:
Session persistence level Navigational state 0 1 2 3 Portlet states Normal, minimized, maximized --- Restored Restored --- Portlet modes configure, edit_defaults, edit, view, help --- Restored Restored --- Pages The last active page before the user logged out --- --- Restored ---
Parent: Configure portal behavior