Fórum

How is session information maintained in Liferay?

thumbnail
Sandeep Nair, modificado 15 Anos atrás.

How is session information maintained in Liferay?

Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Hi,

How is session information maintained in Liferay? Is it done using Cookies solely or is it maintained in Database?

Waiting for reply,

Thanks,
Sandeep.
sameer danthurthy, modificado 15 Anos atrás.

RE: How is session information maintained in Liferay?

New Member Postagens: 5 Data de Entrada: 16/05/07 Postagens Recentes
I would be interested in this too. I am seeing very weird things on how a unique sessionid is generated especially for guest communities.
thumbnail
Rishi Dev Gupta, modificado 15 Anos atrás.

RE: How is session information maintained in Liferay?

Expert Postagens: 255 Data de Entrada: 23/11/08 Postagens Recentes
Hi Sandeep

I am also interested in knowing the way the session is maintaining various values and attributes for user.

I have followed the class
com.liferay.portal.servlet.MainServlet

which is the entry point in the application and can be good location to understand the session and the way the liferay kicks various event services.

Please do post if you have some other info to share regarding the sessions.
thumbnail
Michael Poznecki, modificado 14 Anos atrás.

RE: How is session information maintained in Liferay?

Expert Postagens: 301 Data de Entrada: 10/12/08 Postagens Recentes
Seems like everyone want's to know about this. Shouldn't there be a Wiki?
thumbnail
Parul Seth, modificado 14 Anos atrás.

RE: How is session information maintained in Liferay?

Junior Member Postagens: 83 Data de Entrada: 18/12/08 Postagens Recentes
Hi

May be this can help emoticon

Thanks & Regards
Parul Seth
Impetus Infotech (India) Pvt. Ltd.
thumbnail
Harshal Shah, modificado 13 Anos atrás.

RE: How is session information maintained in Liferay?

Junior Member Postagens: 49 Data de Entrada: 25/05/10 Postagens Recentes
Quick question...Do different instances of a single portlet share the session.

Is there a way where each instance of a single portlet have its own session.

eg a user logs in and access a portlet this portlet stores some information in the session.

Now another user logs in and access the portlet and stores some other information in the session.

Shouldnt both users see a different information. Please reply to harshal82@gmail.com...I will be very thank full to you
thumbnail
Tom Thomas, modificado 13 Anos atrás.

RE: How is session information maintained in Liferay?

Junior Member Postagens: 33 Data de Entrada: 10/09/09 Postagens Recentes
Is there any portal-ext setting that will ensure a session is destroyed once a browser is closed?
I have a kiosk where many people have access to the same terminal.
I've noticed our user base tends to close a browser without logging out. The next person who opens the Liferay portal link will be logged in as the last person.
thumbnail
Harshal Shah, modificado 13 Anos atrás.

RE:SOLVED How is session information maintained in Liferay?

Junior Member Postagens: 49 Data de Entrada: 25/05/10 Postagens Recentes
Ya I got it to work

Ya I got it to work....


<portlet>
....
<private-session-attributes>false</private-session-attributes>
....
</portlet>
doView() of first portlet{
HttpServletRequest diffReq = PortalUtil.getHttpServletRequest(renderRequest);
HttpSession hs = diffReq.getSession();
hs=diffReq.getSession(true);
hs.setAttribute("LIFERAY_SHARED_customerInfo",contents);
}

doView of second portlet{
HttpServletRequest diffrReq = PortalUtil.getHttpServletRequest(renderRequest);
HttpSession hs = diffrReq.getSession();
String sessionid = hs.getId();
String customerInfo=hs.getAttribute("LIFERAY_SHARED_customerInfo");
hs.removeAttribute("LIFERAY_SHARED_customerInfo");
}

Now every time a user opens a new instance of the browser. and accesss the first portlet a new session gets created which is passed on to the second portlet.

Mind you there are only 1 instance of each portlet on 1 on each different page...

I works like a login for the user

If the customer Info is missing I am redirecting to the first portlet....
neelam bhandari, modificado 12 Anos atrás.

RE: How is session information maintained in Liferay?

Regular Member Postagens: 102 Data de Entrada: 16/08/11 Postagens Recentes
Hi Harshal,
What happens when you open portal in two tabs in one browser?

Regards
Neelam