home *** CD-ROM | disk | FTP | other *** search
- <!--- This is a view-only example to illustrate
- CFAPPLICATION --->
- <HTML>
- <HEAD>
- <TITLE>CFAPPLICATION Example</TITLE>
- </HEAD>
-
- <BODY>
- <H3>CFAPPLICATION Example</H3>
-
- <P>CFAPPLICATION defines scoping for a Cold Fusion application
- and enables or disables the storing of client 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.
- <P>Here is a read-only listing of a typical application.cfm file:
-
- <CFOUTPUT>
- #HTMLCodeFormat("
- <!-- Begin Application -->
- <!---
- MODULE: application.cfm
- PURPOSE: application.cfm file for our sample
- CREATED: today's date
- AUTHOR: the author
- COPYRIGHT: (c) 1998 the author for a company
- CHANGE HISTORY:
- --->
- <!--- name application, set session variables to on --->
- <CFAPPLICATION NAME='GetLeadApp' SESSIONMANAGEMENT='Yes'>
- <!--- set datasource for this application --->
- <CFSET dsn = 'my_dsn'>
- <!--- set global error handling for this application --->
- <CFERROR TYPE='REQUEST' TEMPLATE='request_err.cfm' MAILTO='webmaster@mysite.com'>
- <CFERROR TYPE='VALIDATION' TEMPLATE='val_err.cfm' MAILTO='webmaster@mysite.com'>
-
- <!--- set some global variables for this application to
- be triggered on every template --->
- <CFSET MainPage = 'default.cfm'>
- <CFSET session.current_location = 'Davis, Porter, Alewife'>
- <CFSET sm_location = 'dpa'>
- <CFSET current_page = '#cgi.path_info#?#cgi.query_string#'>
- <!-- End Application -->
- ")#</CFOUTPUT>
-
- </BODY>
- </HTML>
-