BBjspSessionData (Deprecated)
The BBJSP system is deprecated. For new development, use BBxServlet.
Description
In BBj 16.0 and higher, this class provides a repository for storing application data in a long-term session similar to a BBjspWebSession and a BBjHttpSession with the added benefit that the data is stored in a context-specific database.
A BBjspSessionData instance is available to BBJSP pages through the public field #BBjspSession! and is available to all BBJSP Widget objects used on BBJSP pages via the BBjspPageContext::getBBjspSession method.
The BBjspSessionData does not support adding BBj Custom objects as these are not serializable.
Creation
BBJSP > BBjspServletContext > BBjspSessionData
The BBjspSessionData is created through the following BBjspServletContext method:
Return Value |
Method |
---|---|
BBjspSessionData |
Methods of BBjspSessionData
Return Value |
Method |
---|---|
boolean |
contains(string name) |
Object |
getAttribute(string name) |
string |
getId() |
long |
|
void |
removeAttribute(string name) |
void |
setAttribute(string name, Object object) |
Example
This example demonstrates how this works in a BBJSP servlet
CLASS
PUBLIC MyServlet |