Skip to main content
Inspiring
October 30, 2012
Answered

Application.cfm

  • October 30, 2012
  • 1 reply
  • 740 views

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,

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    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

    1 reply

    Adam Cameron.Correct answer
    Inspiring
    October 30, 2012

    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

    iccsiAuthor
    Inspiring
    October 30, 2012

    Thanks a million for helping and information,

    Regards,

    Iccsi,