Foros de discusión

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

thumbnail
Soori Babu Meesala, modificado hace 8 años.

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

Junior Member Mensajes: 43 Fecha de incorporación: 10/07/14 Mensajes recientes
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, modificado hace 8 años.

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

Expert Mensajes: 329 Fecha de incorporación: 10/02/11 Mensajes recientes
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, modificado hace 8 años.

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

New Member Mensajes: 24 Fecha de incorporación: 4/09/12 Mensajes recientes
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