I have defined a property in "alfresco-global.properties". How can I access this property from the FTL file of my webscript in Alfresco Share?
I'm using Alfresco Community Version 4.2
I have defined a property in "alfresco-global.properties". How can I access this property from the FTL file of my webscript in Alfresco Share?
I'm using Alfresco Community Version 4.2
You can't access properties files directly from the view (FTL), it violates the Separation Of Concerns principle.
Since the alfresco-global-properties is actually a spring bean of type java.util.Properties
, you can inject the whole thing into your Java Class of your webscript:
<property name="properties">
<ref bean="global-properties"/>
</property>
And then you can access your property like this properties.getProperty("my.custom.property")