User Guide
220 Chapter 12 Using the Application Framework
Example: Application.cfm
The following example shows a complete Application.cfm file for the sample
Products application:
<!--- Set application name and enable Client variables, stored in
a data source called mycompany --->
<cfapplication name="Products"
clientmanagement="Yes"
clientstorage="mycompany"
sessionmanagement="Yes">
<!--- Set custom global error handling pages for this application--->
<cferror type="REQUEST"
template="requesterr.cfm"
mailto="admin@company.com">
<cferror type="VALIDATION"
template="validationerr.cfm">
<!--- Set application-specific constants. These are put in the
Variables scope of every page in the application--->
<cfset homepage="http://www.mycompany.com">
<cfset primarydatasource="CompanyDB">
<!--- set global error handling for this application --->
<!--- set Session variable for this application.--->
<!--- Note that the cfset tag is surrounded by a cflock tag --->
<cflock timeout="30"
scope="Session"
type="exclusive">
<cfset session.current_location = "Davis, Porter, Alewife">
</cflock>
<cfset mainpage = "default.cfm">
<cfset sm_location = "dpa">
<cfset current_page = "#cgi.path_info#?#cgi.query_string#">