Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Placement of Application.cfc
As we said, the code in your Application.cfc file is automatically executed just before each of the pages that make up your application. You might be wondering how exactly ColdFusion does this. How will it know which files make up your application and which ones don’t?
The answer is quite simple: Whenever a user visits a .cfm page, ColdFusion looks to see whether a file named Application.cfc exists in the same directory as the requested page. If so, ColdFusion automatically executes it. Later on, you’ll see exactly which methods of the CFC are executed.
If no Application.cfc exists in the same folder as the requested page, ColdFusion looks in that folder’s parent folder. If no Application.cfc file exists there, it ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access