CFML system environment variable (OpenBD)

1k Views Asked by At

How do I access the system environment variables in CFML? It is required to read out the CloudFoundry database connectivity settings.

The variable required is "VCAP_SERVICES".

Is there a function for that?

Thanks,

Yvan

1

There are 1 best solutions below

4
On BEST ANSWER

Following solution seems to work very-very partially on my Ubuntu (it gets far from all variables listed by env -- bit this may be fine because JVM just does not get most of these), but it may somehow work for you:

<cfset properties = createObject("java", "java.lang.System").properties />
<cfdump var="#properties#">

Variable you are looking for can be prefixed with user.