Include liferay jsp file on custom portlet

April 27, 2012 by Sandeep Bhardwaj | Tags:


If you wants to include a custom jsp contains a common functionality to all your portlets then follow the below steps.

  • Create a Liferay hook » Custom Jsps and create a jsp under /htm/common/.jsp
  • Now simply use the below code for include the jsp on portlet pages.
<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%>  

<liferay-util:include page="/html/common/common_error.jsp">  
</liferay-util:include>