You are here

Portlets

Get the current username from within a portlet

It often happens that you need to know the username from the user who has logged in into the portal. The JSR 168 and 286 standard dictates that the portal should pass this information to the portlet.
This snippet will show you how you can get the username:

Setting a portlet parameter

Portlet parameters are often used to personalize the portlet, but they can also be used for inter portlet communication. When you want two portlets to communicate with each other, you want be able to set the value of a specific parameter. This snippet shows you exactly how to do it:

Getting the PortletRequest in a JSR 286 portlet

The PortletRequest contains a lot of information that you will often need. For example, you will use it to set and get parameters from it.
This little snippet shows you how you can retreive the PortletRequest

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer