Lucee Tag Reference
Tag <CFAPPLICATION>
Defines scoping for a application, enables or disables storing client variables,
and specifies a client variable storage mechanism.
By default, client variables are disabled. Also, enables session variables and sets timeouts
for session and application variables. Session and application variables are stored in memory.
Body
This tag can't have a body.
Example
<cfapplication [action="string"] [applicationtimeout="timespan"] [bufferoutput="boolean"] [cachefile="string"] [cachefunction="string"] [cachehttp="string"] [cacheinclude="string"] [cacheobject="string"] [cachequery="string"] [cacheresource="string"] [cachetemplate="string"] [cachewebservice="string"] [cgireadonly="boolean"] [clientcluster="boolean"] [clientmanagement="boolean"] [clientstorage="string"] [clienttimeout="timespan"] [componentpaths="any"] [compression="boolean"] [customtagpaths="any"] [datasource="object"] [datasources="struct"] [defaultdatasource="object"] [invokeimplicitaccessor="boolean"] [locale="locale"] [localmode="string"] [loginstorage="string"] [mappings="struct"] [name="string"] [onmissingtemplate="object"] [ormenabled="boolean"] [ormsettings="struct"] [requesttimeout="timespan"] [resourcecharset="String"] [s3="struct"] [scopecascading="String"] [scriptprotect="string"] [securejson="boolean"] [securejsonprefix="string"] [sessioncluster="boolean"] [sessionmanagement="boolean"] [sessionstorage="string"] [sessiontimeout="timespan"] [sessiontype="string"] [setclientcookies="boolean"] [setdomaincookies="boolean"] [suppressremotecomponentcontent="boolean"] [tag="struct"] [timezone="timezone"] [triggerdatamember="boolean"] [typechecking="boolean"] [webcharset="String"] [wstype="string"]>
This tag is also supported within cfscript
<cfscript> application [action="string"] [applicationtimeout="timespan"] [bufferoutput="boolean"] [cachefile="string"] [cachefunction="string"] [cachehttp="string"] [cacheinclude="string"] [cacheobject="string"] [cachequery="string"] [cacheresource="string"] [cachetemplate="string"] [cachewebservice="string"] [cgireadonly="boolean"] [clientcluster="boolean"] [clientmanagement="boolean"] [clientstorage="string"] [clienttimeout="timespan"] [componentpaths="any"] [compression="boolean"] [customtagpaths="any"] [datasource="object"] [datasources="struct"] [defaultdatasource="object"] [invokeimplicitaccessor="boolean"] [locale="locale"] [localmode="string"] [loginstorage="string"] [mappings="struct"] [name="string"] [onmissingtemplate="object"] [ormenabled="boolean"] [ormsettings="struct"] [requesttimeout="timespan"] [resourcecharset="String"] [s3="struct"] [scopecascading="String"] [scriptprotect="string"] [securejson="boolean"] [securejsonprefix="string"] [sessioncluster="boolean"] [sessionmanagement="boolean"] [sessionstorage="string"] [sessiontimeout="timespan"] [sessiontype="string"] [setclientcookies="boolean"] [setdomaincookies="boolean"] [suppressremotecomponentcontent="boolean"] [tag="struct"] [timezone="timezone"] [triggerdatamember="boolean"] [typechecking="boolean"] [webcharset="String"] [wstype="string"]; </cfscript>
Attributes
The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name | Type | Required | Description |
---|---|---|---|
action | string | No | action for the data set: - create (default): creates a new application context and overwrite the existing - update: update the existing application context when there is already one, otherwise a new one is created |
applicationtimeout | timespan | No | Enter the CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas, to specify the lifespan of application variables. The default value is specified in the Variables page of the Lucee Administrator. |
bufferoutput | boolean | No | if set to true (default) the output written to the body of the tag is buffered and in case of a exception also outputted. if set to false the content to body is ignored and not disabled when a failure in the body of the tag occur. |
cachefile | string | No | name of the cache used to store data from file operations |
cachefunction | string | No | name of the cache used for function caching in this context |
cachehttp | string | No | name of the cache used to store data from a http tag |
cacheinclude | string | No | name of the cache used to store data from a include |
cacheobject | string | No | name of the cache used for object caching in this context |
cachequery | string | No | name of the cache used for query caching in this context |
cacheresource | string | No | name of the cache used to store data from ram resource in this context |
cachetemplate | string | No | name of the cache used for template caching in this context |
cachewebservice | string | No | name of the cache used to store data from webservice calls |
cgireadonly | boolean | No | if set to true, the CGI Scope is readonly. |
clientcluster | boolean | No | if set to true, lucee uses the storage backend for the client scope as master and Lucee checks for changes in the storage backend with every request, if set to false (default), the storage is only used as slave, lucee only initially gets the data from the storage. Ignored for storage type "memory". |
clientmanagement | boolean | No | Yes or No. Enables client variables. Default is No. |
clientstorage | string | No | Specifies how Lucee stores client variables: |
clienttimeout | timespan | No | Enter the CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas, to specify the lifespan of client variables. The default value is specified in the Variables page of the Lucee Administrator. |
componentpaths | any | No | Contains component paths. |
compression | boolean | No | Enable compression (GZip) for the Lucee Response stream for text-based responses when supported by the client (Web Browser). |
customtagpaths | any | No | Contains custom tag paths. |
datasource | any | No | alias for default datasource |
datasources | struct | No | A structure that contains datasources defintions. |
defaultdatasource | any | No | the default datasource for this environment |
invokeimplicitaccessor | boolean | No | alias for triggerDataMember |
locale | locale | No | Sets the country/language locale for CFML processing. The locale value determines the default format of date, time, number, and currency values, according to language and regional conventions. |
localmode | string | No | Defines how the local scope of a function is invoked when a variable with no scope definition is used (default value set in the Lucee administrator). |
loginstorage | string | No | storage for the login data: - cookie: store login information in the Cookie scope - session: store login information in the Session scope |
mappings | struct | No | A structure that contains mappings. Each element in the structure consists of a key and a value. The logical path is the key and the absolute path is the value. |
name | string | No | The name of your application. This name can be up to 64 characters long. Required for application and session variables, optional for client variables |
onmissingtemplate | any | No | closure/udf executed when the requested template does not exist |
ormenabled | boolean | No | Specifies whether ORM should be enabled for the current application context.The default is false. |
ormsettings | struct | No | A struct that defines all the ORM settings, the following keys are supported: |
requesttimeout | timespan | No | Sets the amount of time Lucee will wait for a request to finish before a request timeout will be raised. This means that the execution of the request will be stopped. |
resourcecharset | String | No | character set used for reading from/writing to various resources |
s3 | struct | No | A struct that defines default S3 settings, this settings can be overwritten as part of the S3 file path, the following keys are supported: |
scopecascading | String | No | Depending on this setting Lucee scans certain scopes to find a variable called from the CFML source. This will only happen, when the variable is called without a scope. (Example: #myVar# instead of #variables.myVar#), the following values are supported: |
scriptprotect | string | No | Specifies whether to protect variables from cross-site scripting attacks |
securejson | boolean | No | A Boolean value that specifies whether to add a security prefix in front of the value that a function returns in JSON-format in response to a remote call. |
securejsonprefix | string | No | The security prefix to put in front of the value that a function returns in JSON-format in response to a remote call if the secureJSON setting is true. |
sessioncluster | boolean | No | if set to true, lucee uses the storage backend for the session scope as master and Lucee checks for changes in the storage backend with every request, if set to false (default), the storage is only used as slave, lucee only initially gets the data from the storage. Ignored for storage type "memory". |
sessionmanagement | boolean | No | Yes or No. Yes enables session variables. Default is No. |
sessionstorage | string | No | Specifies how Lucee stores session variables: |
sessiontimeout | timespan | No | Enter the CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas, to specify the lifespan of session variables. The default value is specified in the Variables page of the Lucee Administrator. |
sessiontype | string | No | Lucee provide 2 kind of sessions: Default value is defined in the Lucee Web Administrator. "j2ee" can not use a session storage. |
setclientcookies | boolean | No | Yes or No. Yes enables client cookies. Default is Yes. If you set this attribute to "No", Lucee 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. |
setdomaincookies | boolean | No | Yes or No. Sets the CFID and CFTOKEN cookies for a domain, not just a single host. Applications that are running on clusters must set this value to Yes. The default is No. |
suppressremotecomponentcontent | boolean | No | Suppress content written to response stream when a Component is invoked remotely. Only works if the content was not flushed before. |
tag | struct | No | tags/attributes default value in the following structure: #{location:{addtoken=false}}# |
timezone | timezone | No | change the timezone defintion for the current application context. |
triggerdatamember | boolean | No | If there is no accessible data member (property, element of the this scope) inside a component, Lucee searches for available matching "getters" or "setters" for the requested property. The following example should clarify this behaviour. "somevar = myComponent.properyName". If "myComponent" has no accessible data member named "propertyName", Lucee searches for a function member (method) named "getPropertyName". |
typechecking | boolean | No | If disabled, Lucee ignores type defintions with function arguments and return values |
webcharset | String | No | character set used for output streams, form-, url-, and cgi scope variables and reading/writing the header |
wstype | string | No | webservice type used, this can be one of the following values |