BackUp LevelNext

Default Variables and Constants

It is often useful to set default variables and application-level constants in the Application.cfm file. For example you may want to designate:

Example: Application.cfm

The following example shows a complete Application.cfm file for the sample Products application:

<!--- Set application name and enable client 
variables option, with client variables stored in 
a data source called mycompany --->

<CFAPPLICATION NAME="Products"
    CLIENTMANAGEMENT="Yes"
    CLIENTSTORAGE="mycompany">

<!--- Install custom error pages --->

<CFERROR TYPE="REQUEST"
    TEMPLATE="RequestErr.cfm"
    MAILTO="admin@company.com">

<CFERROR TYPE="VALIDATION" 
    TEMPLATE="ValidationErr.cfm">

<!--- Set application constants --->

<CFSET HomePage="http://www.mycompany.com">
<CFSET PrimaryDataSource="CompanyDB">

BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.