Skip to main content
Inspiring
September 17, 2008
Question

Initialize Variable in Application.cfc

  • September 17, 2008
  • 1 reply
  • 256 views
With Application.cfc, in which event will I initialiaze default variables eg
Session or application variables that should be seen in all the pages?
This topic has been closed for replies.

1 reply

Inspiring
September 17, 2008
eziokolo wrote:
> With Application.cfc, in which event will I initialize default variables eg
> Session or application variables that should be seen in all the pages?
>

Depends on what variable you are asking about, session or application.

Application variables can be initialized in OnApplicationStart.

Session variables can be initialized in OnSessionStart.

Request variables can be initialized in OnRequestStart.

You may be sensing a pattern here...