掲示板

How is session information maintained in Liferay?

thumbnail
15年前 に Sandeep Nair によって更新されました。

How is session information maintained in Liferay?

Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
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.
15年前 に sameer danthurthy によって更新されました。

RE: How is session information maintained in Liferay?

New Member 投稿: 5 参加年月日: 07/05/16 最新の投稿
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
15年前 に Rishi Dev Gupta によって更新されました。

RE: How is session information maintained in Liferay?

Expert 投稿: 255 参加年月日: 08/11/23 最新の投稿
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
14年前 に Michael Poznecki によって更新されました。

RE: How is session information maintained in Liferay?

Expert 投稿: 301 参加年月日: 08/12/10 最新の投稿
Seems like everyone want's to know about this. Shouldn't there be a Wiki?
thumbnail
14年前 に Parul Seth によって更新されました。

RE: How is session information maintained in Liferay?

Junior Member 投稿: 83 参加年月日: 08/12/18 最新の投稿
Hi

May be this can help emoticon

Thanks & Regards
Parul Seth
Impetus Infotech (India) Pvt. Ltd.
thumbnail
13年前 に Harshal Shah によって更新されました。

RE: How is session information maintained in Liferay?

Junior Member 投稿: 49 参加年月日: 10/05/25 最新の投稿
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
13年前 に Tom Thomas によって更新されました。

RE: How is session information maintained in Liferay?

Junior Member 投稿: 33 参加年月日: 09/09/10 最新の投稿
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
13年前 に Harshal Shah によって更新されました。

RE:SOLVED How is session information maintained in Liferay?

Junior Member 投稿: 49 参加年月日: 10/05/25 最新の投稿
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....
12年前 に neelam bhandari によって更新されました。

RE: How is session information maintained in Liferay?

Regular Member 投稿: 102 参加年月日: 11/08/16 最新の投稿
Hi Harshal,
What happens when you open portal in two tabs in one browser?

Regards
Neelam