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 🙂