Show TOC

Data Exchange Using the Session ObjectLocate this document in the navigation structure

Use

Data stored in the http session will be kept by the server as long as the user session is alive.

JSPDynPage

Getting the request object:

IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

To store a value in the session we have to use the command line:

request.getComponentSession().putValue("myText", "Text in the session context");

To get the stored value we have to use the command line:

request.getComponentSession().getValue("myText");

JSP

To store a value in the session we have to use the command line:

<%

componentRequest.getComponentSession().putValue("myText", "That text is from the JSP");

%>

To get the stored value we have to use the command line:

<%

componentRequest.getComponentSession().getValue("myText").toString();

%>