on 02-19-2005 12:11 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.