cancel
Showing results for 
Search instead for 
Did you mean: 

What is the differn between IPortalComponentSession & HttpSession Object ?

Former Member
0 Kudos

What is the difference between IPortalComponentSession and HttpSession as both of them can be used for storing objects in user's session?.When do we use each of these objects.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The component sessions is per user, per (browser) session, per component ie iView specific. The HTTP session is per user, per (Browser) session and as such can be used to pass data between iViews.

If you simply want to store state over iView refresh then use the component session, if you want to pass objects between iViews (even on different pages) then use the HTTP session.

Both suffer from session time out obviously.

P.

Former Member
0 Kudos

Thanks for the info

Answers (1)

Answers (1)

Former Member
0 Kudos

IPortalComponentSession - scope is with in that component in that session.

HTTPSession - scope is valid for the life time of that session.

Example: data in a bean has been put in IPortalComponentSession scope, you are accessing the component(C1) in that session, later you access some other component(C2) in the same session. You come back to the Component C1, the value is refreshed.

If the same thing has been put in HTTPSession scope, the value still remains. You can try out with a example by putting a bean in IPCsession and HTTPSession.

Regards

Senthil

(If you are happy with the solution reward points)