You will need both Application.cfc and Application.cfm. Move all the main code from Application.cfm to the corresponding parts of Applicaiton.cfc.
Then, and this may be the only line in Applicaiton.cfm:
<cfset variables.dsn = "myDSN" />
Now go back to Application.cfc and add this beyond all the functions:
<cfinclude template="Application.cfm" />
Your test.cfm should now be able to output the dsn variable without the scope prefix:
<cfoutput>#dsn#</cfoutput>
If you define .dsn variables anywhere inside CFC, you put the variable in the CFC variable area, which is private to CFC. Defining it in CFM, then enabling CFM, he saved the page request in the variable area.
Adrian J. Moreno
source share