Creating an Application.cfm Page - Exercise

Contact Us or call 1-877-932-8228
Creating an Application.cfm Page - Exercise

Creating an Application.cfm Page

Duration: 5 to 10 minutes.

In this exercise, you will create a simple Application.cfm page.

  1. Open a new page and save it as Application.cfm in the SessionAndApplication/Exercises folder.
  2. Use the <cfapplication> tag to:
    • Name of a application "RunnersHome".
    • Enable Client variables.
    • Enable Session variables.
  3. Write an if condition to check if an Application variable named datasource is defined. If it is not, set an Application variable called datasource with the value of runners.


<cfapplication sessionmanagement="yes" clientmanagement="yes" name="RunnersHome">

<cfif NOT isDefined("APPLICATION.datasource")>
	<cfset APPLICATION.datasource="runners">