Are you trying to get the users name, or are you trying to get the entire string associated with the URL that was used to invoke the portal server? I'm a little unclear.
Also, is this a publicly accessible portlet, being tested on a public page, or does the environment require you to log on before
testing.
Which version of WebSphere Portal?
Regards,
-Cameron