Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

PORTAL session NOT PortletSession

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I know that Portlet-A will be having different PortletSession then that of Portlet-B, even though both are in same portal page. Here I need a session for a client to store some thing from Portlet-A's PortletSession and the same can be retrieved by Portlet-B's PortletSession. I can't keep/share in ApplicationScope as it is available to entire application/ALL users. I want the data to be available only for that logged in user. So do we have some thing like HttpSession which is unique for each logged in user and can be shared by all portlets with in that unique session.
 
Gangadhar Reddy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No one has replied to my question ;-) However I had found out the solution.

getPortletSession().setAttribute("SOME_CONSTANT", Object, PortletSession.APPLICATION_SCOPE);

getPortletSession().getAttribute("SOME_CONSTANT",PortletSession.APPLICATION_SCOPE);
 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gangadhar

This will only work if you have both the portlets in the same portlet application... only then will the APPLICATION_SCOPE work
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been looking for something about how to share session-beans between portlets in different applications for quite some time now, and I have'nt had any success.

According to this link, it should be in the JSR 286 spesification but I just can't find any information about how to use it!

http://marcus-christie.blogspot.com/2006/09/top-10-coolest-things-coming-in-jsr.html

Please help!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic