ColdFusion 9 adds a few new settings options for your Application.cfc file. Some are documented, some are not. You can find the documentation for these variables here. Here is a quick run down of what was added.
Edited: I'm finding more missing keys, so I've updated the article.
- datasource: Allows you to specify a default datasource for all queries in your application. This one is missing from the list which is a bit surprising, but I'm sure it will be fixed by the doc team. Ben Nadel just covered this as did Forta a few days ago.
- ormenabled: A boolean that determines if ORM is turned on for the application.
- ormsettings: A structure that specifies how ORM is enabled for the application.
- serverSideFormValidation: Allows you to disable server side validation. To be clear, it doesn't mean that it will block all server side validation, but rather, the old school, built in, server side validation based on form field names. I talked about this more last night.
- smtpServer: As you know, cfmail tags will default to the server specified in the Administrator unless you override them at the tag level. This new attribute lets you override it at the application level. Unfortunately, it isn't working for me yet. I specified it, then tried to run a mail tag, and was told that I had not specified a mail server at the admin or tag level. I think it is safe to assume this will work though and it's a nice addition.
- timeout: This allows you to set an application-wide value for your request timeout. Previously this would rely on the Admin setting, or the value in cfsetting. Interestigly the docs say this overrides the cfsetting tag. I would think the cfsetting tag would take priority. I did a quick test, and cfsetting did take priority, which is a good thing, even if it's a doc bug.
- debugipaddress: Allows you to specify a list of IP addresses to enable debugging. Woot! Now folks on a shared host can enable debugging without needing CF Admin access!
- enablerobustexception: Allows you to turn on robust exception handling. Nice... and a bit scary. In general, this should never be enabled on a production server. But if you need it, and again, don't have CF Admin access, this will allow you to enable it for your application.
- googlemapkey: Allows you to define a Google Map's API key for all cfmap tags in the application. Useful if you do not want to specify it at the server or page level.


Comment 1 written by Ben Nadel on 13 July 2009, at 10:00 AM
Comment 2 written by Brian Swartzfager on 13 July 2009, at 10:03 AM
Comment 3 written by Ben Doom on 13 July 2009, at 6:20 PM
Maybe I'll just have to make that suggestion for CF10.
Comment 4 written by Raymond Camden on 13 July 2009, at 10:48 PM
if(structkeyexists(url,"ok")) this.enablerobustexception = true;
else this.enablerobustexception = false;
This let me pass ok=1 in the URL to see the full info.
Comment 5 written by Christoph Schmitz on 14 July 2009, at 3:36 AM
is there a way to override the Application setting of enablerobustexception? Robust exception information is considered a security risk and I can imagine that some providers would be glad if they could disable this.
Chris
Comment 6 written by Raymond Camden on 14 July 2009, at 7:10 AM
Comment 7 written by Ben Doom on 14 July 2009, at 8:46 AM
If you visit my site, and have them turned off, then I do, and have them turned on, then you error, you'll see the error.
I realize that that is a pretty minor risk, but still....
Comment 8 written by Raymond Camden on 14 July 2009, at 8:48 AM
Comment 9 written by Hemant on 5 August 2009, at 10:05 AM
Comment 10 written by Raymond Camden on 5 August 2009, at 1:17 PM
Comment 11 written by Hemant on 5 August 2009, at 10:02 PM
[Add Comment] [Subscribe to Comments]