Fórumok

Accessing portal-ext.properties from the plugins SDK

thumbnail
Dave Morris, módosítva 14 év-val korábban

Accessing portal-ext.properties from the plugins SDK

Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2009.05.07. Legújabb bejegyzések
I am working on a portlet developed in the plugins SDK, and I'm trying to access a custom property that is set in the portal-ext.properties file in the ext environment. For some reason, when I run code like this:

int a = PrefsPropsUtil.getInteger(CusotmPropsKeys.CUSTOM_PROPERTY);

to access my custom property that is set in the portal-ext.properties file, it always returns 0. I realize that having a portlet in the plugins SDK depend on a property that is set in the ext environment isn't ideal, but if it's possible to do, please let me know what I am missing. I can refer to any custom property from Java code inside the ext environment, but for some reason not from the plugins SDK.

Thanks for your help,

Dave Morris
Amine Bousta, módosítva 14 év-val korábban

RE: Accessing portal-ext.properties from the plugins SDK

Junior Member Bejegyzések: 32 Csatlakozás dátuma: 2007.08.02. Legújabb bejegyzések
Hello

I think that is because portal-ext.properties is in webapps/ROOT/WEB-INF/classes whereas your plugin is stored in a different tomcat context (like webapps/[your plugin])

Did you try to make a hook in your plugin to access to portal properties?
thumbnail
Dave Morris, módosítva 14 év-val korábban

RE: Accessing portal-ext.properties from the plugins SDK

Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2009.05.07. Legújabb bejegyzések
I'm not sure how to make a hook like you are talking about. Could you be more specific?

Dave