cancel
Showing results for 
Search instead for 
Did you mean: 

what is the difference between IPortalComponentSession and HttpSession?

Former Member
0 Kudos

Can Any One answer my question

1)What is the difference between IPortalComponentSession and HttpSession?

2)Is both IPortalComponentSession and HttpSession are Same. I mean both are can be used interchangeabally?

3) If both IPortalComponentSession and HttpSession are not same , whenis the IPortalComponentSession is used and when is HttpSession is used? can you please explain the specific functionality of each as per as the portal development is considerd

Thanks and Regards

Prasad.Y

Accepted Solutions (0)

Answers (2)

Answers (2)

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

Hi Prasad,

I have used HTTPSession to interchange data between 2 AbstractPortalComponent's(APC) within the same project.

For ex: To pass a Vector from APC1 to APC2,

In APC1:

<b>request.getComponentSession().getHttpSession().putValue("SAI",vectorObj);</b>

In APC2, to get the vector:

<b> Vector v = (Vector) request.getComponentSession().getHttpSession().getAttribute("SAI");

</b>

Hope it helps.

<b>Regards,

Sai Krishna.

</b>

PS: please do award points if it helps you. :). Ciao.

Former Member
0 Kudos

Thaq Sai,

1)But My Question Are They Interchangeable...

2) I mean Bot the bstractPortalComponents are in same par file or in different par files.

Former Member
0 Kudos

Hi,

As per my knowledge i don't think that they are interchangeable.

And YES, Both components are in the same par file.

<b>Regards,

Sai Krishna.</b>

<b>PS: Please do award points if it helps you. :). Ciao.</b>