BBjHttpSession (Deprecated)

BBjHttpSession is deprecated for BBj 21.00 and higher, and has been replaced by BBxWebSession.

Description

In BBj 12.00 and higher, BBjHttpSession provides session-specific storage for HTTP sessions.

Creation

BBjServletEvent > BBjHttpRequest > BBjHttpSession

A BBjHttpSession object is obtained with the following BBjHttpRequest method:

Return Value

Method

BBjHttpSession

getSession()

Methods of BBjHttpSession

Return Value

Method

string

getAttribute(string name)

BBjVector

getAttributeNames()

BBjJettyContext

getContext()

long

getCreationTime()

string

getId()

long

getLastAccessedTime()

int

getMaxInactiveInterval()

void

invalidate()

boolean

isNew()

void

removeAttribute(string name)

void

setAttribute(string name, string value)

void

setMaxInactiveInterval(int time)

Remarks

None.

Example

rem 'Obtain the instance of the BBjAPI object

LETmyAPI!=BBjAPI()
MyServlet!= new MyServlet()

data!.setCallback(data!.ON_WEB_CONNECTION,myServlet!, "myMethod")

process_events

classpublic MyServlet
methodpublic void myMethod(BBjServletEvent p_event!)
LETchan = UNT
request!= p_event!.getBBjHttpRequest()
response!= p_event!.getBBjHttpResponse()
resp!.setContentType("text/html")
open(chan)"JSERVLET"
print(chan)”<html><body><h1>HelloBBj!”
close(chan)
methodend
classend

See Also

BBjAPI

BBjServletEvent

BBjHttpRequest

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.