I am using jspx pages as a view, and came across an issue of accessing portlet
session from jspx page.
I dispatch request to my page using PortletRequestDispatcher :
javax.portlet.PortletRequestDispatcher prd =
this.getPortletContext().getRequestDispatcher("/index.jspx");
| prd.include(request, response);
the issue arise when I am trying to access session attributes that has been set
in processAction method.
Since session shared between portlets on the page I set session attribute with
PORTLET_SCOPE that will add portlet prefix in front of the attribute name. If I
am using PortletSession I can retrieve it with no problems, but jsp page got
HttpSession that knows nothing about attribute prefix.
For now I wrote PortletSessionAttributesWrapper that wraps portlet session into
Map interface so I can use ExpressionLanguage (EL and JSTL) to access
PortletSession attributes.
request.setAttribute("portletSession", new
PortletSessionAttributesWrapper(session));
But it is way inefficient since session attributes exposed as Enumeration.
Is there are any other way of solving this issue?
So far I don't see any other solution.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933842#3933842
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933842
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user