B4J Question [ABMaterial]Session with Cookie, how?

hibrid0

Active Member
Licensed User
Longtime User
Hi guys forum, I want some of help to know how can I make sessions with cookies.
Or something to get access for some features of our WebApp.
 
On the Browser Side you can use Cookies with these methods:

Page.CookieSet("test", "testvalue", "expires: '01/01/2017'") ' set the cookie
Log(Page.CookieGet("test")) ' get the cookie
Page.CookieExpire("test", "") ' remove the cookie

On the server side you can use the Session object:

page.ws.Session.SetAttribute("test", "testvalue")
page.ws.Session.GetAttribute2("test", "") ' "" = default return value

They do not mix of course (e.g. you can't get a Cookie from the session objects)
 
Upvote 0
Back
Top