Whatever message this page gives is out now! Go check it out!
<cfapplication
datasource="data_source_name"
name = "application name"
applicationTimeout = #CreateTimeSpan(days, hours, minutes, seconds)#
clientManagement = "yes|no"
clientStorage = "data_source_name|Registry|Cookie"
loginStorage = "cookie|session"
passarraybyreference = "true | false"
searchimplicitscopes = "true | false"
googleMapKey = "map key"
scriptProtect = "none|all|list"
serverSideFormValidation = "yes|no"
sessionManagement = "yes|no"
sessionTimeout = #CreateTimeSpan(days, hours, minutes, seconds)#
setClientCookies = "yes|no"
setDomainCookies = "yes|no"
compileextforinclude = "comma_separated_list"
strictnumbervalidation = "true|false">Attribute | Req/Opt | Default | Description |
authCookie | Optional | Struct containing ColdFusion Authentication cookie related properties | |
datasource | Optional | Name of the data source from which the query retrieves data. | |
name | See Description | Name of application. Up to 64 characters. For Application and Session variables: Required. For Client variables: Optional | |
applicationTimeout | Optional | Specified in Variables page of ColdFusion Administrator | Lifespan of application variables. CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas. |
clientManagement | Optional | no |
|
clientStorage | Optional | registry | How client variables are stored:
|
exchangeServerVersion | Optional | 2007 | Specifies the Microsoft Exchange Server version. The values are:
|
googleMapKey | Optional | The Google Maps API key required to embed Google Maps in your web pages. | |
loginStorage | Optional | cookie |
|
passArrayByReference | Optional | False | True if array is to be passed by reference. |
searchImplicitscopes | Optional | False | False if implicit scopes should not be searched by default. This attribute covers look-up in the following implicit scopes:
|
scriptProtect | Optional | Determined by ColdFusion Administrator Enable Global Script Protection setting | Specifies whether to protect variables from cross-site scripting attacks
Enabling the global site protection replaces all the null bytes (%00) with an %20. This is to prevent Null Byte injection Attacks as part of the Protection. To disable this protection just for cookie scope the following workaround can be used.
|
secureJSON | Optional | Administrator value | |
serverSideFormValidation | Optional | yes | If no, disables validation on cfform fields when the form is submitted. |
secureJSONPrefix | Optional | Administrator value | The security prefix to put in front of the value that a ColdFusion function returns in JSON-format in response to a remote call if the secureJSON setting is true. The default value is the value of the Prefix serialized JSON setting in the Administrator Server Settings > Settings page (which defaults to //, the JavaScript comment character). For more information see Improving security in the Developing ColdFusion Applications. |
sessionCookie | Optional | Struct containing ColdFusion session cookie related properties. | |
sessionManagement | Optional | no |
|
sessionTimeout | Optional | Specified in Variables page of ColdFusion Administrator | Life span of session variables. CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas. |
setClientCookies | Optional | yes |
|
setDomainCookies | Optional | no |
|
| compileextforinclude | Optional | Specify the list of allowed file extensions (as a comma separated list) for the <cfinclude> tag. Specifying a wildcard ('*') in the list makes any file included using the <cfinclude> tag to be compiled. If any file included using the <cfinclude> tag is not found in this list, their content will be statically included. By default, files with the extensions cfm and cfml are always compiled irrespective of this setting. See cfinclude . | |
| strictnumbervalidation | Optional | true | In ColdFusion 10 and earlier versions, the IsValid function allowed currency symbols at the start and commas inside the number. Starting from ColdFusion 11, this function evaluates on a more strict basis. Setting this value to false makes the isValid function to behave in the older way. This setting effects cfargument , cfparam and cfform tags wherever integer & numeric validation is used. Based on this setting, the validation reflects in those tags as well. |
<!--- This example shows how to use cflock to prevent race conditions during data updates to variables in Application, Server, and Session scopes. --->
<h3>cfapplication Example</h3>
<p>cfapplication defines scoping for a ColdFusion application and enables or disables application and/or session variable storage. This tag is placed in a special file called Application.cfm that automatically runs before any other CF page in a directory (or subdirectory) where the Application.cfm file appears.</p>
<cfapplication name = "ETurtle"
sessionTimeout = #CreateTimeSpan(0, 0, 0, 60)#
sessionManagement = "Yes">
<!--- Initialize session and application variables used by E-Turtleneck. --->
<cfparam name="application.number" default="1">
<cfparam name="session.color" default= "">
<cfparam name="session.size" default="">
<cfif IsDefined("session.numPurchased") AND IsNumeric(trim(session.cartTotal))>
<!--- Use the application scope for the application variable to prevent race condition. This variable keeps track of total number of turtlenecks sold. --->
<cflock scope = "Application" timeout = "30" type = "Exclusive">
<cfset application.number = application.number + session.numPurchased>
</cflock>
</cfif>
<cfoutput>
E-Turtleneck is proud to say that we have sold #application.number# turtlenecks to date.
</cfoutput>
<!--- End of Application.cfm ---><cfset cookiest = {httponly='true', timeout=createTimeSpan(1, 0, 0, 0), samesite='Strict | Lax | None'}>
<cfset authcookiest = {samesite='Strict | Lax | None'}>
<cfapplication name="newApp" sessionmanagement="Yes" authCookie=#authcookiest# sessioncookie=#cookiest# >