Skip to main content
Inspiring
Oct 30, 2012 4:25 PM UTC
Answered

Application.cfm

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 is closed to new replies. Start a new post to keep the conversation going.
    Adam Cameron.Correct answer
    Inspiring
    Oct 30, 2012 4:30 PM UTC

    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

    2 replies

    Adam Cameron.Correct answer
    Inspiring
    Oct 30, 2012 4:30 PM UTC

    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

    Translate
    iccsiAuthor
    Inspiring
    Oct 30, 2012 5:30 PM UTC

    Thanks a million for helping and information,

    Regards,

    Iccsi,

    Translate