Ask a Jedi: Application.cfc versus Application.cfm

Tony asks:

When an application.cfm and an application.cfc file are both in the root of an application, do both get executed? Or does the .cfc take over, and the .cfm is just ignored?

First off - I wouldn't put both files in the same folder. ColdFusion won't throw an error, but I still wouldn't do it. That being said - if both exist, the CFC version will run instead of the CFM. They definitely do not both run.

By the way - this surprised me. CF is normally super backwards compatible. I had assumed the CFM file would win over the CFC.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA