You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by "Julie MacNaught (JIRA)" <ws...@ws.apache.org> on 2005/04/11 23:47:17 UTC

[jira] Commented: (WSRP4J-39) The pluto PortletInvokerImpl assumes there is always a valid UserContext available

     [ http://issues.apache.org/jira/browse/WSRP4J-39?page=comments#action_62593 ]
     
Julie MacNaught commented on WSRP4J-39:
---------------------------------------

I can't find this code.  Please tell me exactly the package and file name of the code that needs to be changed. Thanks!

> The pluto PortletInvokerImpl assumes there is always a valid UserContext available
> ----------------------------------------------------------------------------------
>
>          Key: WSRP4J-39
>          URL: http://issues.apache.org/jira/browse/WSRP4J-39
>      Project: WSRP4J
>         Type: Bug
>   Components: Producer
>     Versions: current (nightly)
>  Environment: Tomcat 4.1.30, Win XP, etc.
>     Reporter: Ricky Frost

>
> Whenever I use a portal that supports using portlets without logging in first I get a NullPointerException in the PortletInvokerImpl when it tries to get the remoteUser variable from the incoming request. The request has:
>    <userContext xsi:nil="true" />
> and so the getUserContext returns null.
> The simple fix is to null protect the check in BOTH the markup and blocking action calls as in the following before and after:
> // before
> String remoteUser = request.getUserContext().getUserContextKey();
> // after
> String remoteUser = "";
> UserContext userCtx = request.getUserContext();
> if( userCtx != null )
>     remoteUser = userCtx.getUserContextKey();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira