Dec 11, 2011 7:40 AM
170 Posts
topic has been resolvedResolved

Get sessionid in SSJS

  • Category: Server Side JavaScript
  • Platform: Not Applicable
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 2
 Is it possible to get the sessionid for the current xpage in SSJS?
 
/Fredrik 
 
 
 
Dec 11, 2011 7:48 AM
170 Posts
Re: Get viewid in SSJS
 Founf how to do it thru the cookie
 
@Right(facesContext.getExternalContext().getRequest().getHeader("Cookie").split(";")[0],"=") 
 
/Fredrik 
 
 
 
Dec 11, 2011 4:42 PM
272 Posts
Re: Get sessionid in SSJS
Hi Fredrik,
 
you can get the session id in SSJS like this:
 
facesContext.getExternalContext().getRequest().getSession().getId();
 
Sven