How to read portlet.properties file in Liferay DXP

Leave a Comment

How to read portlet.properties file in Liferay DXP

In case if you are using portlet.properties file in Osgi module then using below snippet you can read property specified in portlet.properties file.

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

String fromEmailAddress = _configuration.get("report.form.emailaddress");




Read other posts on Liferay DXP

How To Include Static Resources (CSS/JS/Images) In Liferay OSGI Module
How To Include Custom Portlet In Theme - Liferay DXP
How To Specify External Jar Dependency In Liferay DXP
How To Specify Module Dependencies In Liferay DXP
How To Disable Re-Indexing Of All Journal Article Versions In Liferay DXP

Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment