How to read values from properties file in plugin



     1.Configure  portlet.properties in  /your-portlet/docroot/WEB-INF/src/portlet.properties as below

               messages.to.prefetch=30

     2.To read the values in jsp describe as below,
               
             <%@page import="com.liferay.util.portlet.PortletProps"%>
             <%=PortletProps.get("messages.to.prefetch")%>

You can get the value as 30.

Comments

  1. Thanks below link may help others
    http://tariqliferay.blogspot.com/2015/02/how-to-read-and-write-properties-files.html

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate