Posted on Leave a comment

Determine Portlet URL in Liferay

Liferay Logo

Since Liferay has a helper class for almost everything but finding the correct one sometimes costs more time than expected here is how you determine a portlet’s current URL:

  String currentPorletURL = PortletURLUtil.getCurrent(renderRequest, renderResponse).toString());

Hopefully this saves you some time 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.