Show TOC

BeansLocate this document in the navigation structure

Use

JSP pages in the portal can reference Java beans as in standard JSP pages.

In the portal the scope attribute of the <jsp:bean> action, which is used to instantiate a bean, acts somewhat differently, as shown in the following table, which lists the values that are valid for the scope attribute:

Scope

Description

How to Reference Bean from Component

page

Bean can be accessed within the current page.

pageContext object

request

Bean can be accessed within the current request.

request object

session

Bean can be accessed within the current user session.

PortalComponentSession object, from request.getSession()

application

Bean can be accessed from pages that process requests that are in the same application as the one in which they were created.

PortalComponentContext object

All references to the object are released when the the PortalComponentContext object is reclaimed.