-
1. Re: Sharing session attribute between servelt and portlet
pmn92 May 12, 2008 11:12 AM (in response to sbiwal)I read that you cannot share data in session between two different war files.
I don't know if this explained it - I never tried anyway. -
2. Re: Sharing session attribute between servelt and portlet
claprun May 13, 2008 5:20 AM (in response to sbiwal)Sharing session data indeed only works for portlets and servlets bundled in the same web application (war file).
I think the problem here is that the name of the param is namespaced for the portlet so if you set a param called "foo" in the portlet session, you cannot access it using just "foo" in the servlet. Please look at the servlet specification for the namespace format. -
3. Re: Sharing session attribute between servelt and portlet
pmn92 Jun 8, 2008 10:57 AM (in response to sbiwal)So, in short what is the name space chosen by jboss portal to register parameters in the global session?
-
4. Re: Sharing session attribute between servelt and portlet
rivetlogic Jun 17, 2008 11:51 AM (in response to sbiwal)Try using APPLICATION SCOPE to retrieve the session attribute in your portlet code.
request.getPortletSession().getAttribute("foo", PortletSession.APPLICATION_SCOPE);
Best Regards,
Shagul -
5. Re: Sharing session attribute between servelt and portlet
sbiwal Jun 17, 2008 11:14 PM (in response to sbiwal)Thanks. I had started using the APPLICATION_SCOPE and it worked.
-
6. Re: Sharing session attribute between servelt and portlet
ruchika Jan 12, 2009 12:36 AM (in response to sbiwal)Hello,
How I can access the session attribute value ( set using
renderRequest.setAttribute("MainCommand", renderRequest.getPortletSession().getAttribute("commandType", PortletSession.APPLICATION_SCOPE));) from jsp page
Regards,
rgd