Determine Portlet URL in Liferay

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 🙂

You may also like...

Leave a Reply

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