Maybe the Title seems bit odd, but my question is straight, how can reinitialize the application with Application.cfm, i know how we do in Application.cfc like
<cfscript>
if(structKeyExists(url, 'reinit')) {
onApplicationStart();
}
</cfscript>
But how in Application.cfm, not sure, please guide
Thanks
Firstly, running
onApplicationStart()no more restarts the application than running anonClick()mouse-click event handler causes your mouse button to depress.onApplicationStart()is called as a result of the application starting, not the other way around.Secondly, Application.cfm has nothing to do with the application lifecycle, it is merely a CFML file that is included at the beginning of every request. it is more closely associated with
onRequestStart()thanonApplicationStart(): the file is, unfortunately, misnamed. Its counterpartonRequestEnd.cfmdemonstrates this.I presume your requirement here is to re-initialise your application scope, yes? Do you have all your application-scope setting isolated in a specific CFML file, eg:
applicationSettings.cfm, and then have logic like this in yourApplication.cfm:(then as a last thing in
applicationSettings.cfmsetapplication.initedtotrue).If so you simply need to modify your condition to include your URL reinit variable, eg: