Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Portlet session.

 
Kumar Shanmugam
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I have indidual portlet applications deployed in OAS Portal 10G. I need to pass user related information to all applications which are indidual portlets to do some co-branding. I know that I can append these as a parameter to the Portlet URL. But I don't want to do that. Apart from that what are the possible options to put that in Session and access them in other portlets?

Please let me know.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you doing JSR168? With JSR-168 portlets, you have the common APPLICATION_SCOPE that allows data to be shared with portlets in a common portlet application. Of course, that means all the portlets must be in a common war file.

You could cast the PortletSession into an HttpSession, and extract stuff like that, although you may find quirks going from one portal server to another using this method.

And of course, there's always the centralized database solution, although that's not always desireable. On WebSphere, I love the portlet/portal services that you can access and configure.

Ever though of accessing a Session EJB? That's another option.

Good luck.

-Cameron McKenzie
 
Amit A Balode
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumar..
If you are having only 1 application with number of portlets,servlets,jsps,etc.. in it then you can use the APPLICATION_SCOPE of Portlet Session as Cameron suggested.
However if you are having number of applications which want to share data.. then you can put the COPPERATIVE portlets concept in use..
 
Kumar Shanmugam
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Thanks for the suggestion.

All my applications are seperate portlets and they are deployed as seperate
WAR files.I don't know what is cooperative portlets which Amid suggest.

Please let me know How I can incorporate session in these kind of portlets.

Thanks.
 
SL Narasimhan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to pass user related information stored in a directory server, you can user USER_INFO feature of JSR portlets. If you want to retrieve just the user id, use portletRequest.getUserPrincipal()

Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic