No, not as a function of the native language. the key bit on the page you're linked to is "ColdFusion does not allow you to specify constant names"
I think the page really talks about literals, not about constants.
If you want to support immutable constants, I think you will need to use an object to encapsulate values:
component displayname="constant values for my app" { property name="mailServer" default="127.0.0.1" getter=true setter=false property name="password" default="supersecret" getter=true setter=false }
You can then install this in any area that you need (for example, an application or request), then call application.constants.getMailServer ()
This is not as concise as the @ Miguel-F solution that I use most of the time, but it is here as another option.
barnyr
source share