14
CFML Language Reference
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.
SETDOMAINCOOKIES
Optional. Yes or No. Sets the CFID and CFTOKEN cookies for an entire domain not
just a single host. Applications that are running on clusters must set this value to
Yes. The default is No.
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.
Server, Application, and Session Variables
Whenever you display, set, or update variables in the server, application, and session
scopes, you should use the CFLOCK tag with the SCOPE attribute. For server variables,
specify the "Server" scope. For application variables, specify the "Application" scope.
For session variables, specify the "Session" scope. See
CFLOCK
for information about
locking server, application, and session scopes.
If you are running ColdFusion on a cluster, you must specify either Cookie or a data
source name for CLIENTSTORAGE; you cannot specify Registry.
Example
<!-------------------------------------------------------------
This example shows how CFLOCK can be used to guarantee the
consistency of data updates to variables in the Application,
Server, and Session scopes.
You should copy the following code into an Application.cfm
file in the snippets directory.
--------------------------------------------------------------->
<HTML>
<HEAD>
<title>Define Session and Application Variables</title>
</HEAD>
<BASEFONT FACE="Arial, Helvetica" SIZE=2>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...