User Guide

Table Of Contents
Defining the application and its event handlers in Application.cfc 283
This section describes the following topics:
Naming the application
Setting application properties
Setting page processing options
For information on setting default variables, see “You can set default variables and application-
level constants in Application.cfc. For example, you can do the following:” on page 287.
Naming the application
Define the application and give it a name by setting the This.name variable in the Application.cfc
initialization section, before the method definitions. By using a specific application name, you
define a set of pages as part of the same logical application.
ColdFusion supports unnamed applications, which are useful for ColdFusion applications that
must interoperate with JSP tags and servlets. Consider creating an unnamed application only if
your ColdFusion pages must share Application or Session scope data with existing JSP pages and
servlets. You cannot have more than one unnamed application on a server instance. For more
information on using unnamed applications, see
“Sharing data between ColdFusion pages and
JSP pages or servlets” on page 923
.
Setting application properties
You can specify application properties by setting This scope variables in the Application.cfc
initialization code. (These are the same properties that you can set in the
cfapplication tag.)
The following table lists the This scope variables that ColdFusion MX uses to set application
properties and describes their uses.
Variable Default Description
applicationTimeout Administrator
value
Life span, as a real number of days, of the application,
including all Application scope variables. Use the
createTimeSpan function to generate this variable.
clientManagement False Whether the application supports Client scope variables.
clientStorage Administrator
value
Where Client variables are stored; can be cookie, registry, or
the name of a data source.
loginStorage Cookie Whether to store login information in the Cookie scope or the
Session scope.
scriptProtect Administrator
Value
Whether to protect variables from
cross-site scripting attacks.
sessionManagement False Whether the application supports Session scope variables.
sessionTimeout Administrator
Value
Life span, as a real number of days, of the user session,
including all Session variables. Use the
createTimeSpan
function to generate this variable.