File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes Getting Portlet session. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Getting Portlet session." Watch "Getting Portlet session." New topic
Author

Getting Portlet session.

Kumar Shanmugam
Greenhorn

Joined: May 14, 2004
Posts: 29
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.


Kumar Shanmugam,<br />Atlanta, USA.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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

Joined: May 17, 2007
Posts: 3
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..


Thanks & Regards<br />Amit.Balode<br /> <br />Sun certified Java Programmer 1.4 <br />Sun certified Web Component Develpoer 1.4 <br />IBM Certified Solution Developer -- WebSphere Portal V5.1
Kumar Shanmugam
Greenhorn

Joined: May 14, 2004
Posts: 29
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

Joined: Jul 19, 2005
Posts: 22
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


SCJP 1.4<br />SCWCD 1.4<br />SCBCD 1.3<br />IBM Certified Solution Developer - WebSphere Portal 6<br />IBM WebSphere Portal 6 Deployment and Administration
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Portlet session.
 
Similar Threads
Achieving Inter-portlet communication.
PORTAL session NOT PortletSession
Why Use Protlets?
spring global session scope
Access JSF web application from Portal Server