CFAPPLICATION  
 
 

Defines scoping for a ColdFusion application, enables or disables storing client variables, and specifies a client variable storage mechanism. By default, client variables are disabled. Also used to enable session variables and to set timeouts for both session and application variables. Session and application variables are stored in memory.

 
 
  Syntax  
 
<CFAPPLICATION NAME="Name"
    CLIENTMANAGEMENT="Yes/No"
    CLIENTSTORAGE="Storage Type"
    SETCLIENTCOOKIES="Yes/No" 
    SESSIONMANAGEMENT="Yes/No"
    SESSIONTIMEOUT=#CreateTimeSpan(days, hours, 
      minutes, seconds)#
    APPLICATIONTIMEOUT=#CreateTimeSpan(days, hours, 
      minutes, seconds)#>

NAME

The name you want to give your application. This name can be up to 64 characters long. Required for application variables to work. Optional for client and session variables.

CLIENTMANAGEMENT

Optional. Yes or No. Enables client variables. Default is No.

CLIENTSTORAGE

Optional. Specifies the mechanism for storing client variables:

  • datasourcename -- ColdFusion stores client variables in the specified ODBC or native data source. To use this option you must create a client variable storage repository using the Variables page of the ColdFusion Administrator.
  • Registry -- ColdFusion stores client variables in the system registry. This is the default.
  • Cookie -- ColdFusion stores client variables on the client machine in a cookie. Storing client data in a cookie is scalable to large numbers of clients, but this storage mechanism has some limitations. Chief among them is that if the client turns off cookies in the browser, client variables won't work.

SETCLIENTCOOKIES

Optional. Yes or No. Yes enables client cookies. Default is Yes.

If you set this attribute to "NO", ColdFusion does not automatically send the CFID and CFTOKEN cookies to the client browser; you must manually code CFID and CFTOKEN on the URL for every page that uses Session or Client variables.

SESSIONMANAGEMENT

Optional. Yes or No. Yes enables session variables. Default is No.

SESSIONTIMEOUT

Optional. Enter the CreateTimeSpan function and the values you want in days, hours, minutes, and seconds, separated by commas to specify the lifespan of any session variables that are set. The default value is specified in the Variables page of the ColdFusion Administrator.

APPLICATIONTIMEOUT

Optional. Enter the CreateTimeSpan function and the values you want in days, hours, minutes, and seconds, separated by commas to specify the lifespan of any application variables that are set. The default value is specified in the Variables page of the ColdFusion Administrator.

 
 
  Usage  
 

CFAPPLICATION is typically used in the Application.cfm file to set defaults for a specific ColdFusion application.

CFAPPLICATION enables application variables unless they have been disabled in the ColdFusion Administrator. Using the SESSIONMANAGEMENT attribute to enable session variables is also overridden by the Administrator. See Administering ColdFusion Server for information about the ColdFusion Administrator.

If you are running ColdFusion on a cluster, you must specify either Cookie or a data source name for CLIENTSTORAGE; you cannot specify Registry.





 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.