留言板
how to call portal properties from server level
syed ahamed,修改在7 年前。
how to call portal properties from server level
New Member 帖子: 8 加入日期: 11-3-28 最近的帖子
explain how to call custom portal properties file from server level through custom portlet and hooks class file
Thanks in advance.
Thanks in advance.
Danielle Ardon,修改在7 年前。
RE: how to call portal properties from server level
Junior Member 帖子: 37 加入日期: 16-6-6 最近的帖子
Do you mean retrieving the value from properties from the servers portal-ext.properties file in your own custom portlet?
You can use the liferay util method PropsUtil.get("prop.key"); for this
https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/kernel/util/PropsUtil.html
So let's say you have portal-ext.property:
test.property=teststring
you can do
If it does not exist it will simply return an empty string.
You can use the liferay util method PropsUtil.get("prop.key"); for this
https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/kernel/util/PropsUtil.html
So let's say you have portal-ext.property:
test.property=teststring
you can do
String fromPortalExt = PropsUtil.get('test.property');
If it does not exist it will simply return an empty string.