| Author |
How to pass session data between 2 Portlets???
|
rajen prasad
Greenhorn
Joined: Aug 16, 2006
Posts: 15
|
|
Hi, I have a basic doubt in portals . Can we pass session (HttpSession or PortletSession ) data from one portlet to another portlet??? If yes please tell me how to do that?? Thanks in advance, Rajendra Prasad.
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
The answer is yes and no. Not only can portlets not share session data with other portlets, they can't even share session data between the exact same type of portlet if that portlet appears more than once on the same page (portlet instance, I guees). However, JSR168 introduced something called APPLICATION_SCOPE for portlet session. With application scope, you can share session data between portlets that are part of the same portlet application (packaged in the same war) This puts something into the session in one portlet, using APPLICATION_SCOPE This pulls it out: Note that APPLICATION_SCOPE is not the default. I have a tutorial that demonstrates how APPLICATION_SCOPE works, and also have a completed JSR168 war file you can download and mess around with the code on your own. Free Tutorial on the various PortletSession Scopes Enjoy! -Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: How to pass session data between 2 Portlets???
|
|
|