Take a look at Listing 19.1, a simple Application.cfc file. This example makes use of the onRequestStart method. Because the two <cfset> tags are executed before each page request, the dataSource and companyName variables can be referred to within any of the application’s ColdFusion templates. For instance, the value of the dataSource variable will always be ows.
If you save this listing, be sure to save it as Application.cfc, not Application1.cfc.
<!--- Filename: Application.cfc (The "Application Component") Created by: Raymond Camden (email@example.com) Purpose: Sets "constant" variables and includes consistent header ---> <cfcomponent output="false"> ...