Forums de discussion

Liferay 6.2 Shared Session attributes error

Praveen Kumar, modifié il y a 10 années.

Liferay 6.2 Shared Session attributes error

New Member Publications: 14 Date d'inscription: 23/03/13 Publications récentes
Hi All,

I was trying out Liferay 6.2 CE GA1, and in this course i was exploring Liferay session attribute sharing feature.

The use case.

1. Create a hook filter, set a session attribute with name "LIFERAY_SHARED_MY_ATTRIBUTE"
2. Create a plugin portlet project, called "My 6.2 Portlet". Try to access the session attribute "LIFERAY_SHARED_MY_ATTRIBUTE", using the API

renderRequest.getPortletSession().getAttribute("LIFERAY_SHARED_MY_ATTRIBUTE", 
                                                  PortletSession.APPLICATION_SCOPE);


This is returning a null value. Which essentially means I am not able to share the Portal session attributes using the prefix "LIFEAR_SHARED_"

Did anyone face the same issue?

Thanks,
Praveen
Praveen Kumar, modifié il y a 10 années.

RE: Liferay 6.2 Shared Session attributes error

New Member Publications: 14 Date d'inscription: 23/03/13 Publications récentes
Any insights will be appreciated.
B C, modifié il y a 10 années.

RE: Liferay 6.2 Shared Session attributes error

New Member Publications: 11 Date d'inscription: 18/06/13 Publications récentes
Hi,

It's the same for me...

Did you find any resolution ?

Regards,
thumbnail
Thomas Berg, modifié il y a 9 années.

RE: Liferay 6.2 Shared Session attributes error

Regular Member Publications: 131 Date d'inscription: 07/09/09 Publications récentes
Hello Praveen,

Have you tried setting the values (in portal-ext.properties)

session.enable.phishing.protection=false
(Not recommended)

or added LIFERAY_SHARED_MY_ATTRIBUTE to

session.phishing.protected.attributes=HTTPS_INITIAL,LAST_PATH,LIFERAY_SHARED_MY_ATTRIBUTE


Also check this thread which discusses this in more detail:

https://www.liferay.com/community/forums/-/message_boards/message/11742874

I've created an issue to find out if this works as expected:

https://issues.liferay.com/browse/LPS-47577

Update:
The issue has been closed and Tomas Polesovsky's comment cleared all my confusion about these settings.