
BBjHttpSession
Creation Path
|
+-- 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) |
long |
|
string |
getId() |
long |
|
int |
|
void |
|
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 LET myAPI!=BBjAPI() MyServlet! = new MyServlet()
data!.setCallback(data!.ON_WEB_CONNECTION, myServlet!, "myMethod")
PROCESS_EVENTS
class public MyServlet method public void myMethod(BBjServletEvent p_event!) LET chan = UNT request! = p_event!.getBBjHttpRequest() response! = p_event!.getBBjHttpResponse() resp!.setContentType("text/html") open(chan)"JSERVLET" print(chan)”<html><body><h1>Hello BBj!” close(chan) methodend classend |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.