Blog

Brad Wood

January 30, 2013

Spread the word


Share your thoughts

 

One of the handy things about the ColdBox settings CFC is you can store ad-hoc settings for your application which can be retrieved or injected anywhere in your application.  
 
Remember, since your settings config is just a struct in a CFC, you aren't limited to settings which are strings.  You can store pretty much any kind of setting that will fit into a ColdFusion variable.
 
// Custom Settings
settings = {
    useSkins = true,
    servers = ['web1','web2','web3','web4'],
    skinsPath = "views/skins",
    myUtil = createObject("component","#appmapping#.model.util.MyUtility")
};
 
// Add another late addition here
settings["setMe"] = {as = 'you wish'};
 
 
P.S. Don't forget, in your environment overrides you don't need to specify the entire settings struct again.  You can override individual settings by referencing them directly.
 
function stage() {
    settings.servers = ['stage1','stage2'];
}
 

Add Your Comment

Recent Entries

TestBox 7 : Real-Time Streaming, a Browser IDE, and a Major Leap for BoxLang

TestBox 7 : Real-Time Streaming, a Browser IDE, and a Major Leap for BoxLang

TestBox 7.x series continues our mission to be the best testing framework for BoxLang and CFML. This release is focused heavily on BoxLang CLI runner enhancements, real-time streaming test execution via SSE, a powerful dry run capability, the brand-new TestBox RUN web IDE, and significant quality-of-life improvements for developers working in both BoxLang and CFML environments.

Luis Majano
Luis Majano
March 17, 2026
From Legacy Risk to Modern Agility: A Phased Modernization Roadmap for CFML Teams

From Legacy Risk to Modern Agility: A Phased Modernization Roadmap for CFML Teams

Many organizations running CFML applications today face the same challenge.

Their systems still work.

They support core business processes.

They generate revenue.

But at the same time, those platforms are increasingly exposed to risk.

Unsupported runtimes, operational fragility, security exposure, and difficulty integrating with modern systems are becoming more common in environments still running older versions of Adobe ColdFusion or Lucee.

The quest...

Cristobal Escobar
Cristobal Escobar
March 16, 2026
Introducing the BoxLang Spring Boot Starter: Dynamic JVM Templating for Spring

Introducing the BoxLang Spring Boot Starter: Dynamic JVM Templating for Spring

Spring Boot developers know the pain of evaluating view technologies. Thymeleaf is great — until you need more expressiveness. FreeMarker is powerful — until the syntax fights you. What if you could write templates in a dynamic JVM language that gives you the full power of the platform, feels natural, and requires zero setup to integrate?

Meet the BoxLang Spring Boot Starter.

Luis Majano
Luis Majano
March 13, 2026