AnsweredAssumed Answered

Reading alfresco-global.properties from Web Script?

Question asked by netsi42 on Apr 7, 2010
Latest reply on Jun 11, 2012 by mrksjs
I have several properties that are different for each environment we are running (e.g. Test, Dev, etc).  I would like to be able to access these conveniently in alfresco-global.properties directly from a Web Script i.e. using something like ${config.global.server.my_prop_name.value}.  The closest I came gave me the error:
Exception:  org.alfresco.config.ConfigException - 03060000 Reading the Server config via the generic interfaces is not supported

I can create a file such as webscript-framework-config-custom.xml (in /shared/classes/alfresco/web-extension) and read it fine - but again, it would be great to have all values in one spot. 

I'm hoping there's a way to either read alfresco-global.properties directly, or indirectly via a reference in webscript-framework-config-custom.xml (or maybe even through the *.get.config.xml file?).  Or maybe there is a better way to handle environment-dependent properties?  We're using Enterprise 3.2R.

Thanks in advance.

Outcomes