BBjHttpSession

Creation Path


BBjServletEvent

|

+-- BBjHttpRequest

    |

    +-- BBjHttpSession


Description

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

Creation

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

REMObtain 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.