on 01-06-2005 6:27 AM
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.
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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.