Can I use sessions in portlets?
Yes, the specification defines a PortletSession interface that allows a portal/portlet-container to use any of the session tracking approaches (such as HTTP Cookies, SSL Sessions or URL rewriting) to track a user’s session. The PortletSession interface defines two scopes for storing objects, APPLICATION_SCOPE and PORTLET_SCOPE. Use APPLICATION_SCOPE, if you want to access attributes which have been placed within the session in external resources like your servlet. The PORTLET_SCOPE attributes, although available to other resources, are used for attributes that are meant for the portlet’s use only.