Skip to main content
March 6, 2008
Question

Application.cfm

  • March 6, 2008
  • 3 replies
  • 855 views
I am trying to start a new application, I have seen a lot of application.cfm examples but I want to ask wich information is needed to start the application or where can I find some examples and explanations.
I know i have to define a session and I can add some variables to it, but what's needed or recommended to be in that file.

Thanks
This topic has been closed for replies.

3 replies

BKBK
Community Expert
Community Expert
March 16, 2008
Ayuso_15 wrote:
I am trying to start a new application, I have seen a lot of application.cfm examples but I want to ask wich information is needed to start the application or where can I find some examples and explanations.
I know i have to define a session and I can add some variables to it, but what's needed or recommended to be in that file.


As you want to use sessions, you must first enable sessions in the Coldfusion Administrator. On the Memory Variables page, tick the checkboxes to Enable Application Variables and Enable Session Variables. Then save the following code as a basic Application.cfm file. You should then be up and running. Good luck.



March 7, 2008
Check out Adobe's LiveDocs on this topic at http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa3.htm
Inspiring
March 6, 2008
Are you asking about the Application.cfm file or the <cfapplication...> tag.

There are separate concepts that do not depend on each other even though
they do work very well together.

Application.cfm is simply a file that will automatically be included at
the beginning of any other CFML template in the same directory and any
sub-directory. As such it is a file where you put any code you want to
be included in each and every file in this directory branch.

The <cfapplication...> tag lets you define an 'application' construct
inside the ColdFusion server that can share data scopes and can have
start and end states. For a template to be considered part of a given
'application' in the server it must have a <cfappliation...> tag that
shares the name of the application. Thus the one and only requirement
for the <cfapplication ...> tag is the name property. Other properties
such as 'sessionManagement' and 'applicationTimeOut' are optional and
can be included or not as dependent on your requirements.

And as you can see, since the <cfapplication...> tag needs to be
included in every template that is to be part of the same 'application'
construct, putting it into a Application.cfm file that is automatically
included in every template is a very natural thing to do.

March 7, 2008
Ok, I was trying to know how to set up the session management in the application.cfm so I need tu use <cfapplication> do you know where can i find some examples? or do you have any of them?
Thanks