Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 247

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
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
and JSP pages or
servlets" on page 1130.
Setting application properties
Specify application properties by setting This scope variables in the Application.cfc initialization code. (These are the
same properties that you set in the
ColdFusion uses to set application properties and describes their uses.
Variable
applicationTimeout
clientManagement
clientStorage
loginStorage
scriptProtect
sessionManagement
sessionTimeout
setClientCookies
setDomainCookies
The following example code from the top of an Application.cfc sets the application name and properties:
<cfcomponent>
<cfset This.name = "TestApplication">
<cfset This.clientmanagement="True">
<cfset This.loginstorage="Session">
<cfset This.sessionmanagement="True">
<cfset This.sessiontimeout="#createtimespan(0,0,10,0)#">
<cfset This.applicationtimeout="#createtimespan(5,0,0,0)#">
For more information on these settings, see
Setting page processing options
The
tag lets you specify the following page processing attributes to apply to all pages in your application:
cfsetting
tag.) The following table lists the This scope variable that
cfapplication
Default
Description
Administrator value
Life span, as a real number of days, of the application, including all Application
scope variables. Use the
False
Whether the application supports Client scope variables.
Administrator value
Where Client variables are stored; can be cookie, registry, or the name of a
data source.
Cookie
Whether to store login information in the Cookie scope or the Session scope.
Administrator Value
Whether to protect variables from cross-site scripting attacks.
False
Whether the application supports Session scope variables.
Administrator Value
Life span, as a real number of days, of the user session, including all Session
variables. Use the
True
Whether to send CFID and CFTOKEN cookies to the client browser.
False
Whether to use domain cookies for the CFID and CFTOKEN values used for
client identification, and for Client scope variables stored using cookies. If
False, ColdFusion uses host-specific cookies. Set to True for applications
running on clusters.
cfapplication
Last updated 1/20/2012
"Sharing data between ColdFusion pages
createTimeSpan
function to generate this variable.
createTimeSpan
function to generate this variable.
in the CFML Reference.
242

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents