File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Portals and Portlets and the fly likes Accessing user profile in portlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Accessing user profile in portlets" Watch "Accessing user profile in portlets" New topic

Accessing user profile in portlets

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104

We know that portlets on a web page cannot share session data. So in such a case, how can all portlets show user specific data respectively, as session is not common among them. I am using WPS 7.0.2
vijay sagar MAA

Joined: Jun 22, 2007
Posts: 5
Below are the different ways of sharing data between portlets. Just google and you will get the sample code.

Share Render parameters.
Share Data on the portletSession. Add attributes to the APPLICATION_SCOPE.
Share data by using portlet events
Share data through the cooperative portlets

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104
Using an APPLICATION_SCOPE we can just share data among portlets that are in the same war file. But when there are multiple portlets on a page i..e multiple war files, then how can every portlet know about the logged in user and display customized content. Does it mean that we should use IBM Puma API to do that?
Navin Manwatkar

Joined: Jan 11, 2010
Posts: 10
which specification you are using? if it is JSR286 then you may go for "Public render parameter" or "eventing".

Navin Manwatkar
I agree. Here's the link:
subject: Accessing user profile in portlets
It's not a secret anymore!