Skip to main content
April 20, 2010
Answered

am i supposed to invoke application.cfc?

  • April 20, 2010
  • 1 reply
  • 712 views

My website is always on the index.cfm page, do I just throw a <cfinvoke> tag in there to call the application.cfc?  Am I supposed to name it with an uppercase A (Application.cfc)?

    This topic has been closed for replies.
    Correct answer ilssac

    You want the Application.cfc file to be in the same directory or a higher directory of all the CFML templates that you would like to be affected by it.

    So for your root index file, yes you wold probably want the Application.cfc file to be in the web root.  But it could be higher if you wanted it to be, but that is somewhat unusual.

    1 reply

    BKBK
    Community Expert
    Community Expert
    April 20, 2010

    Am I supposed to name it with an uppercase A (Application.cfc)?

    Yes.

    My website is always on the index.cfm page, do I just throw a <cfinvoke> tag in there to call the application.cfc?

    No. Coldfusion instantiates Application.cfc automatically.

    April 20, 2010

    does it need to be in my root directory of my website?

    ilssac
    ilssacCorrect answer
    Inspiring
    April 20, 2010

    You want the Application.cfc file to be in the same directory or a higher directory of all the CFML templates that you would like to be affected by it.

    So for your root index file, yes you wold probably want the Application.cfc file to be in the web root.  But it could be higher if you wanted it to be, but that is somewhat unusual.