Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
venkat g
How to share session attributes between a portlet and a theme
October 11, 2010 12:27 AM
Answer

venkat g

Rank: New Member

Posts: 4

Join Date: October 11, 2010

Recent Posts

How to share session attributes between a portlet and a theme.
venkat g
RE: How to share session attributes between a portlet and a theme
October 12, 2010 5:33 AM
Answer

venkat g

Rank: New Member

Posts: 4

Join Date: October 11, 2010

Recent Posts

Looking for help on the above topic.
Arun Kumar S
RE: How to share session attributes between a portlet and a theme
October 12, 2010 5:46 AM
Answer

Arun Kumar S

Rank: Regular Member

Posts: 181

Join Date: June 23, 2008

Recent Posts

venkat g:
How to share session attributes between a portlet and a theme.



Hi Venkat,

I hope the below link helps you

Access Objects from Velocity



1. $renderRequest.getPortletSession()

Use the above code in vm to access Portlet Session in theme.

HTH,
Arun.
venkat g
RE: How to share session attributes between a portlet and a theme
October 13, 2010 12:44 AM
Answer

venkat g

Rank: New Member

Posts: 4

Join Date: October 11, 2010

Recent Posts

Hi Arun,

I am getting nothing when i am using $renderRequest.getSession() and $request.getSession()
in portal_normal.vm

I have set a session attribute in view.jsp in calender portlet, and able to get in dictionary portlet, but unable to get in the theme.

request.getSession().setAttribute("LIFERAY_SHARED_ValueFromPortlet1","venkat");
venkat g
RE: How to share session attributes between a portlet and a theme
October 13, 2010 4:27 AM
Answer

venkat g

Rank: New Member

Posts: 4

Join Date: October 11, 2010

Recent Posts

Hi Arun,

Now i am able to get session attribute which i set in a portlet from vm using

$request.getSession().getAttribute(key);

but I am unable to get the same attribute in jsp which i included in theme.

Any body please suggest.
Brian Scott Schupbach
RE: How to share session attributes between a portlet and a theme
June 10, 2013 11:33 AM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 331

Join Date: October 23, 2008

Recent Posts

Did you ever figure this out?

I am wanting to do the same thing.

Thanks,

Brian