Yes I am on CF8 and I do have an application.cfc.
Here it is:
<cfcomponent name="Application" displayname="Application Component.">
<cfsilent>
<cfsetting showdebugoutput="yes" />
<!----[ Set up basic application settings, cross-version ]---->
<cfset this.name = "WA-AVMApp">
<cfset this.applicationTimeout = CreateTimeSpan(1,0,0,0)>
<cfset this.sessionManagement = true>
<cfset this.sessionTimeout = CreateTimeSpan(0,1,0,0)>
<cfset this.clientManagement = true>
<cfset this.clientStorage = "cookie">
<cfset this.loginStorage = "session">
<cfset this.setClientCookies = true>
<cfset this.setDomainCookies = false>
<cfset this.scriptProtect = false>
<!----[
============================================================================================================
Application start and end
============================================================================================================
]---->
<cffunction name="onApplicationStart" returntype="boolean" output="true">
<!--- Set up Application variables. Locking the Application scope is not
necessary in this method. --->
<cfset application.baseDSN = "webappraiser" />
<cfset application.basePath = "D:\Inetpub\webappraiser\" />
<cfscript>
application.streetDir = { east="e", north="n", northeast="ne",
northwest="nw", south="s", southeast="se", southwest="sw", west="w" };
</cfscript>
<cfreturn true />
</cffunction>
<cffunction name="onApplicationEnd" returnType="void" output="false">
<cfargument name="ApplicationScope" required="true">
</cffunction>
<!----[
============================================================================================================
Session start and end
============================================================================================================
]---->
<cffunction name="onSessionStart" returnType="void" output="true">
</cffunction>
<cffunction name="onSessionEnd" returnType="void" output="false">
<cfargument name="sessionScope" type="struct" required="true">
<cfargument name="appScope" type="struct" required="false">
</cffunction>
<!----[
============================================================================================================
Request start and end
============================================================================================================
]---->
<cffunction name="onRequestStart" returnType="boolean" output="true">
<cfargument type="string" name="targetPage" required=true>
<!--- RENEW APPLICATION VARIABLES --->
<cfif structKeyExists(URL, "reset") AND URL.reset IS "Yes">
<cfset this.onApplicationStart()>
</cfif>
<cfreturn true>
</cffunction>
<cffunction name="onRequestEnd" returntype="void" output="true">
<cfargument name="targetPage" required="true">
</cffunction>
<!--- Begin OnRequest Method - Executes during the page request --->
<cffunction name="onRequest" returnType="void">
<cfargument name="thePage" type="string" required="true">
<cfinclude template="#arguments.thePage#">
</cffunction>
<!----[
============================================================================================================
OnError method not in use for this tutorial
============================================================================================================
]---->
<cffunction name="onError" returnType="void" output="true">
<cfargument name="Exception" required="true">
<cfargument name="EventName" required="true">
<cfset var errMsg =
Application.utils.exceptions.GetExceptionMessage(arguments.Exception)>
<!--- <cfset Application.utils.exceptions.SendExceptionEmail(this.name,
arguments.Exception)> --->
<h2>An error has occurred...</h2>
<p>
#errMsg#
</p>
</cffunction>
</cfsilent>
</cfcomponent>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334313
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm