concept session attribute in category java

appears as: session attributes, session attribute, session attributes
Portlets in Action

This is an excerpt from Manning's book Portlets in Action.

Portlet containers provide the PortletSession object so you can store user-specific data across portlet requests. PortletSession is similar to HttpSession, and it provides methods to maintain session attributes, get and set the maximum interval of time for which the session can remain inactive, get PortletContext, and so on. Just as each web application has a unique HttpSession per user, each portlet application has a unique PortletSession per user.

The use of PORTLET_SCOPE and APPLICATION_SCOPE gives the impression that the session attributes are stored in two differently scoped containers, with the APPLICATION_SCOPE scoped container being accessible to other web components in the portlet application. In reality, when you add a session attribute to PORTLET_SCOPE, what happens is that the portlet container stores the attribute in APPLICATION_SCOPE with a fabricated (or encoded) name. The fabricated name for the PORTLET_SCOPE session attributes follows this format: