MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 39

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
<BODY
<H3>CFAPPLICATION Example</H3>
<P>CFAPPLICATION defines scoping for a ColdFusion application and
enables or disables the storing of application and/or session
variables. This tag is placed in a special file called
Application.cfm that is run before any other CF template in a
directory where the Application.cfm file appears.
<CFAPPLICATION NAME="ETurtle" SESSIONTIMEOUT=#CreateTimeSpan(0, 0,
0, 60)# SESSIONMANAGEMENT="yes">
<!-------------------------------------------------------------
Initialize the session and application variables that will be
used by E-Turtleneck. Use the session scope for the session
variables.
--------------------------------------------------------------->
<CFLOCK SCOPE="Session" TIMEOUT="30" TYPE="Exclusive">
</CFLOCK>
<!----------------------------------------------------------------
Use the application scope for the application variable. This
variable keeps track of the total number of turtlenecks sold.
------------------------------------------------------------------->
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="Exclusive">
</CFLOCK>
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="ReadOnly">
</CFLOCK>
<!--- End of Application.cfm --->
bgcolor="#FFFFD5">
<CFIF NOT IsDefined("session.size")>
<CFSET session.size = "">
</CFIF>
<CFIF NOT IsDefined("session.color")>
<CFSET session.color = "">
</CFIF>
<CFIF NOT IsDefined("application.number")>
<CFSET application.number = 1>
</CFIF>
<CFOUTPUT>
E-Turtleneck is proud to say that we have sold
#application.number# turtlenecks to date.
</CFOUTPUT>
15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents