Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
reading http session attribute in javascript
I have a post login hook where I have saved a http session attribute like:
How can I do this? I was thinking of Liferay object or sessionStorage - but no luck so far.Best RegardsAnindya Bagchi
session.setAttribute("agencyCode", agencyCode);
I have a react portlet (JS toolkit https://help.liferay.com/hc/en-us/articles/360029028051-Developing-a-React-Application) where I want to read this attribute.How can I do this? I was thinking of Liferay object or sessionStorage - but no luck so far.Best RegardsAnindya Bagchi
Hi ,
To access session attribute you may need to do it from server side only , you can make an ajax call to server and read the required info from session object.
To access session attribute you may need to do it from server side only , you can make an ajax call to server and read the required info from session object.