Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

session

Description

The session tag provides access to session attributes.

Tag Body

Empty

Restrictions

If the id attribute is specified then the page attribute is restored using the session attribute. If the name attribute is specified then the session attribute is saved using the page attribute. If neither is specified then the session attribute is removed.

Attributes

This tag has the following attributes for which the Required values are “Yes” and “No”:

id

Name of the page attribute to restore from the session attribute.

name

Name of the page attribute to save into the session attribute.

attribute

Name of the session attribute to operate on.

Properties

None.

Example(s)
<%-- create a date bean to use --%>
<util:bean id="now" type="java.util.Date"/>

<%-- save that bean into the session attributes --%>
<util:session name="now" attribute="viewDay">

<%-- restore from the session attributes --%>
<util:session id="now" attribute="viewDay"/>

<%-- remove the bean from the session attributes --%>
<util:session attribute="viewDay"/>