myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Wynn" <>
Subject Re: Access portal user information in JSF Portlet application
Date Fri, 04 May 2007 19:54:16 GMT
On 5/4/07, Nebinger, David <> wrote:
> > First of all, it's easier to get the request map from the
> > ExternalContext:
> >
> > Map requestMap = externalContext.getRequestMap();
> For the http request parameters, sure you're correct.  But he's got a
> portlet and he's looking for a portlet request parameter, so he's going
> about things the correct way.

MyFacesGenericPortlet creates a special derivation of ExternalContext
for you that wraps the portlet request (and portletSession, etc).  So
getRequestMap() is going to give you a map backed by the
portletRequest parameters.  In essence alot of stuff works no matter
what container you are in, as long as you don't cast to container
specific classes.  So I would agree with Kito on the first point and
not cast specifically to PortletRequest.

View raw message