Liferay 6 and below version: 

import com.liferay.util.portlet.PortletProps;


Liferay DXP :

Older version approach is not working in DXP to overcome this we need to follow the below step.

Step 1:

Create class in your custom portlet as show below snippet.

import com.liferay.portal.kernel.configuration.Configuration;
import com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil;

public class PortletPropsConfigurationUtil
public static String get(String key)
return _configuration.get(key);

public static String[] getArray(String key)
return _configuration.getArray(key);

private static final Configuration _configuration =
ConfigurationFactoryUtil.getConfiguration(PortletPropsConfigurationUtil.class.getClassLoader(), "portlet");

Step 2:






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: