aspose file tools
The moose likes Portals and Portlets and the fly likes Portlets sharing a global variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "Portlets sharing a global variable" Watch "Portlets sharing a global variable" New topic
Author

Portlets sharing a global variable

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
Hi,

I want a variable to be accessible to all the portlets. How do i achieve this with out using application scope variables?

Thanks,
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4967

All portlets in a war file, or all portlets in the portal?

The PortletContext is global to all portlets packaged in a war, but can't be accessed outside the war.

For truely global variables, you'll need to do your own implementation - maybe something as simple as a common database table all portlets can read from. In the IBM world, we often do this through a PortletService.


Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
I have to access all the portlets in a war file. so i will be using PortletContext. Thanks a lot for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Portlets sharing a global variable
 
Similar Threads
Application Scope Session in IBM portal server
Handling Portlet requests
jboss portlet
Inter portlet application communication
Who wants a Sun cert exam for portlets? for jsf?