FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



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
 

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.