• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

ColdFusion (2018 release) imports environment vars into the server scope

Adobe Employee ,
Mar 04, 2020 Mar 04, 2020

Copy link to clipboard

Copied

Thanks to Charlie's blog and Pete's tweet, we have another hidden gem in ColdFusion (2018 release). 

ColdFusion (2018 release) imports environment variables into the server scope.

For instance,

<cfscript>
    writeDump(server.system.environment)
</cfscript>

The snippet above returns a struct that contains environment variables.

ColdFusion (2018 release) also imports Java system properties.

For instance,

<cfscript>
    writeDump(server.system.properties)
</cfscript>

The snippet above returns a struct that contains Java system properties.

Pete has also documented these scopes in the cfdocs site.

TOPICS
Advanced techniques

Views

464

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation