3 Replies Latest reply on May 28, 2007 11:59 AM by Chuck1411


      Below is a section of my application.cfc.
      The page loads ok but when I make changes to
      the applcication variables (e.g Application.var1="var1Name"; ) no changes take place when the page reloads on the browser.

      I have to restart the ColdFusion service for this changes to be implementated. For example if I cahnge the value of Application.var1 to "three". I will need to restart the service for this to be implemented.
      Any ides ?

      <cfset This.applicationimeout = createTimeSpan(0,0,20,0)>
      <cfset This.clientmanagement= "yes">
      <cfset This.loginstorage = "session">
      <cfset This.Sessionmanagement = "yes">
      <cfset This.Sessiontimeout = createTimeSpan(0,0,20,0)>
      <cfset This.SetClientCookies = "yes">
      <cfset This.SetDomainCookies = "no">
      <cfset This.ScriptProtect = "all">
      <cfset This.SiteMaintenance="false">
      <cfset This.thePath = " http://localhost/resume/">

      <cffunction name="onApplicationStart">
      //set your app vars for the application
      Application.var2 = "var2Name";

        • 1. Re: Application.cfc
          Level 7
          Any ideas?

          Yup. It is working exactly like it is supposed to. Reloading the page
          in the browser is not a new application start. An application start, by
          definition, only happens once after any previous application has timed
          out or been stopped, such as stopping the ColdFusion service.

          Two ideas to consider. If you are resetting variables, should they be
          application variables. Maybe you are really dealing with data that
          should be session variables.

          Second, most of us write some kind of refresh trigger into our apps.
          What I usually do is in onRequestStart of code something like this.

          <cfif structKeyExists(ur,"refresh")>

          This will call the onApplicationStart function if the request contains a
          refesh variable.

          • 2. Re: Application.cfc
            bemall Level 1
            Thank you.
            • 3. Application.cfc
              Chuck1411 Level 1
              Sorry, can't delete post.