OpenWGA 7.7 - TMLScript reference
TMLContext "this"Property :
cookies
On object | TMLContext "this" |
Usage |
Represents the browser cookies of the current user |
Description |
Returns an Array of JavaEE cookie objects, representing the cookies that are set for the current browser session. Every cookie object has the properties name, value, path, domain and more. For a complete reference see the JavaEE API Dokumentation. Returns null if there are no cookies. |
Writable | False |
Return value | Array of Java objects of type javax.servlet.http.Cookie |
Allowed in script types |
|
Examples |
Retrieving properties from cookie objects.this.cookies[0].name Since the property returns null if there are no cookies it is neccessary to test for it before testing the length of the cookies array: if (cookies != null && cookies.length > 0) { |