How to get url request parameter from inside LIferay/IceFaces/JSF portlet backing bean

Posted by Negatizmo on Stack Overflow See other posts from Stack Overflow or by Negatizmo
Published on 2011-09-20T19:51:11Z Indexed on 2012/10/08 3:37 UTC
Read the original article Hit count: 303

Filed under:
|
|
|
|

Is posible for a portlet to read a request parameter of its surrounding page?

E.g. the URL of the page the portlet resides in is http://example.com/mygroup/mypage?foo=bar Is it possible to read the "foo" parameter from a portlet that is on that page?

Portlet Container is Liferay 6.0.5.

P.S.

I have already tried:

com.liferay.portal.util.PortalUtil.getOriginalServletRequest(com.liferay.portal.util.PortalUtil.getHttpServletRequest((javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest())).getParameter("foo")

but I always get null for productId

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf