Because if you don't restart CF then the Application is already started and
onApplicationStart will never fire. The Application starts on the first
browser request to the CF server after the CF server is started.

Additionally, you may want to close and re-open your browser to get
onSessionStart to fire. 

- Calvin

-----Original Message-----
From: Bert Dawson [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 11, 2005 6:50 AM
To: CF-Talk
Subject: Re: can't get onApplicationStart to fire...

No, but then why should i? If the methods were getting called then the
?.started variables would be getting set, but only request.started is
getting set.

Bert

On Fri, 11 Feb 2005 06:32:53 -0500, Calvin Ward <[EMAIL PROTECTED]> wrote:
> Are you restarting CF before you request index.cfm?
> 
> -----Original Message-----
> From: Bert Dawson [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 11, 2005 5:48 AM
> To: CF-Talk
> Subject: can't get onApplicationStart to fire...
> 
> I can't seem to get onApplicationStart to run, nor onSessionStart, but
> on request start works fine. I'd be grateful if someone could caste an
> eye over my code to see if they can spot what i'm doing wrong:
> 2 files in a directory: Application.cfc and index.cfm:
> ------------------------------------------
> Application.cfc:
> <cfcomponent>
> 
> <cffunction name="onApplicationStart" returnType="boolean">
>         <cfset application.started = now()>
>         <cfreturn True>
> </cffunction>
> 
> <cffunction name="onRequestStart" returnType="boolean">
>         <cfset request.started = now()>
>         <cfreturn True>
> </cffunction>
> 
> <cffunction name="onSessionStart" returnType="void">
>         <cfset session.started = now()>
> </cffunction>
> 
> </cfcomponent>
> ------------------------------------------
> index.cfm:
> <cfapplication name="#CreateUUID()#"
>         clientmanagement="No"
>         sessionmanagement="Yes"
>         setclientcookies="No">
> 
> <cfdump var="#application#">
> 
> <cfdump var="#request#">
> 
> <cfdump var="#session#">
> ------------------------------------------
> 
> When i run index.cfm only request.started has been set (plus
> application.name, session.jsessionid and session.urltoken, and
> request.cfdumpinited).
> TIA
> Bert
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194215
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to