ColdFusion - how to create and dump Application variables

Application Variables

application.cfm


<cfapplication 
 name="cfexample"
    clientmanagement="yes" 
    sessionmanagement="yes" 
    sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
    >

<cfset Application.Author.Name="cfsuman">
<cfset Application.Author.FavoriteColor="DeepPink">

<cfset Application.DSName="cfbookclub">
<cfset Application.Description="ColdFusion Example">


ApplicationVariables.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Application Variables: how to create and dump Application variables</title>
</head>

<body>
<h2 style="color:Crimson; font-style:italic">ColdFusion Application Variables example: how to create and dump</h2>
<hr width="600" align="left" color="LightPink" />
<br />

<cfdump var="#Application#">
<br />


<font style="font-weight:bold; color:Green; font-size:large;">Example Application Variable Output</font>
<br />

<font style="color:OrangeRed; font-weight:bold; font-family:'Courier New', Courier, monospace;">
    DataSource Name[#Application.DSName#]: <cfoutput>#Application.DSName#</cfoutput>
</font>

</body>
</html>







More ColdFusion tutorials