Foren

How to update GUEST_LANGUAGE_ID cookie expire/ max age to session?

thumbnail
Soori Babu Meesala, geändert vor 8 Jahren.

How to update GUEST_LANGUAGE_ID cookie expire/ max age to session?

Junior Member Beiträge: 43 Beitrittsdatum: 10.07.14 Neueste Beiträge
Hi,
I am using Liferay Portal 6.2 EE. I embedded Language Portlet in theme. When I change the language in language portlet it is setting the GUEST_LANGUAGE_ID cookie with modified language id and max age - 1 Year. My requirement is that expiry date / max age should be "session" i.e. whenever I close my browser it should delete the GUEST_LANGUAGE_ID cookie. How can I achieve this?

~Regards,
Soori Babu Meesala
thumbnail
Prakash Khanchandani, geändert vor 8 Jahren.

RE: How to update GUEST_LANGUAGE_ID cookie expire/ max age to session?

Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste Beiträge
The cookie is set in com.liferay.portlet.language.action.ViewAction class, so to modify that you would have to override the struts-action using a struts-action hook and update the cookie code to what you desire it to be.

I think this is the configuration you would need to modify in your hook xml:
<action path="/language/view" type="com.liferay.portlet.language.action.ViewAction"></action>


Or else if you want more control use an EXT-plugin, but hope you know - With great power comes great responsibility emoticon (and most of the time we neither have time nor energy for such greater responsibilities)

Hope this helps.

-
Prakash K
(Fulcrum Worldwide)
Suyash Bhalekar, geändert vor 8 Jahren.

RE: How to update GUEST_LANGUAGE_ID cookie expire/ max age to session?

New Member Beiträge: 24 Beitrittsdatum: 04.09.12 Neueste Beiträge
Set below property in portal-ext.properties file :
session.enable.persistent.cookies=false

Note: look after it's pros and cons.

hope this help emoticon