BBjspPageContext::saveBBjspSession (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 16.0 and higher, this method saves the current BBjspSessionData associated with the current BBjspPageContext.

Syntax

Return Value

Method

void

saveBBjspSession()

Parameters

None.

Return Value

None.

Remarks

None.

Example

This example demonstrates how this works in a BBJSP widget

REM ===
REM === A BBjspWidget that counts page-visits for the user.
REM ===
class public PageCounterWidget implements BBjspWidget
    method public void open(BBjspPageContext context!)
        context!.runPipelineByName("MyPipeline")
        
        request! = context!.getRequest()
        response! = context!.getResponse()
        session! = context!.getSession()
        data! = context!.getBBjspSession()
        ct = 0
        if data!.contains("VISIT_COUNT") then
            ct = num(data!.getAttribute("VISIT_COUNT"))
        endif
        ct = ct + 1
        data!.setAttribute("VISIT_COUNT",str(ct))
        
        context!.saveBBjspSession()
        
    methodend
classend

See Also

BBJSP

BBjspPageContext