First visit on the page with portlet check in Liferay

 HttpServletRequest request = PortalUtil.getHttpServletRequest(renderRequest);

List<String> headerValuesList=Collections.list(request.getParameterNames());
if (headerValuesList.isEmpty()) {
System.out.println("THIS IS FIRST VISIT TO THE PAGE with PORTLET");
doSomething(renderRequest, renderResponse);
}

Comments

Popular posts from this blog

Azure App Service for Liferay DXP Installations

What Azure Infrastructure is better for Liferay DXP