Forums de discussion

custom properties

Andrea Scarafoni, modifié il y a 14 années.

custom properties

New Member Publications: 3 Date d'inscription: 13/07/09 Publications récentes
Hi, my question is about how to extend the portal.properties file with some custom pair of key-value and how can i retrieve it later.
I didn't find any example to implement this behaviour.

thanks for any suggestion
thumbnail
Aarti Jain, modifié il y a 14 années.

RE: custom properties

Regular Member Publications: 116 Date d'inscription: 02/09/08 Publications récentes
Hi,

You can add custom properties to portal.properties, but if you are adding new its better that you add in portal-ext.properties.

In your portal-ext.properties file you can add your custom attribute name say if it is "user.default.org.name" then in portal-ext.properties you can add:

user.default.org.name=abc (whatever is the custom attribute value you want to set)

Then you can retrieve this using the following code:

String str = PropsUtil.get("user.default.org.name");

Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
Andrea Scarafoni, modifié il y a 14 années.

RE: custom properties

New Member Publications: 3 Date d'inscription: 13/07/09 Publications récentes
Thank you very much Aarti