Previous Page | Next Page

Hints and Tips for Creating Custom Portlets

Obtaining the User's Name

In a portlet initializer or action class, you can obtain the display name of the user that is logged on from the user context. For information about obtaining the user context, see Obtaining a User and Session Context.

IdentityInterface aPerson = userContext.getPerson();
String name = aPerson.getDisplayName();

Previous Page | Next Page | Top of Page