Copy link to clipboard
Copied
Does ColdFusion need application.cfm to store the application parameter?
Is application.cfm is required in the ColdFusion application?
Your information and help is great appreciated,
Regards,
Iccsi,
No. Application.cfm is very badly named: it should be OnRequestStart.cfm. It doesn't - intrinsically - have anything to do with applications in the ColdFusion sense of that notion.
What you do need, however, is a <cfapplication> tag that gets run on every request, to bind the request to an application (and, by proxy, to a session). The best place to put something that needs to be run every request is in Application.cfm.
That said, you ought to be using Application.cfc for this sort of thing, no
...Copy link to clipboard
Copied
No. Application.cfm is very badly named: it should be OnRequestStart.cfm. It doesn't - intrinsically - have anything to do with applications in the ColdFusion sense of that notion.
What you do need, however, is a <cfapplication> tag that gets run on every request, to bind the request to an application (and, by proxy, to a session). The best place to put something that needs to be run every request is in Application.cfm.
That said, you ought to be using Application.cfc for this sort of thing, not Application.cfm. Application.cfm is - for all intents and purposes - obsolete. It still works, but it is grossly inferior to Application.cfc. And there is no reason to be using it in favour of going with the recommended Application.cfc route.
--
Adam
Copy link to clipboard
Copied
Thanks a million for helping and information,
Regards,
Iccsi,