Holy cow! I just realized that Application.cfc-scoped methods such as OnApplicationStart() and OnRequestStart() as well as any other custom user-defined ColdFusion functions (in the Application.cfc) are stored in and are accessible via the current page's VARIABLES scope. Meaning, you can call things like:
<!--- Call application event. ---> <cfset VARIABLES.OnApplicationStart() /> <!--- Call UDF. ---> <cfset VARIABLES.UDFDefinedInAppCFC() />
This seems a bit silly to me, but I am glad I'm finally aware of this.
Want to use code from this post? Check out the license.