Are you outputting the THIS.name from one of the Built-in Function's methods or are you outputting it from another page?
THIS scope is referencable from the component, so if a page is trying to call it.
In the onApplicationStart(), do:
<cfset APPLICATION.datasource = THIS.datasource />
And then on the page that is referencing the variable, have it use APPLICATION.datasource instead.
I'm trying to call This.Name from a .cfm page.
I added the <cfset APPLICATION.datasource = THIS.datasource /> and no luck. I even tried
<cfset APPLICATION.datasource = "MyDatabase" /> in OnApplicationStart.
When I tried to output APPLICATION.datasource and still get similar results
APPLICATION.datasource is undefinded.
Have you given your application a name?
<cfset THIS.name = 'testapp' />
If your application successfully started and you change some code in the onApplicationStart(), it will not execute unless manually called or having restarted the application.
Yes Applicatoin has a name.
I have restated server multiple times.
I also have this on RequestStart which isn't fireing as well.
<cfif structKeyExists(URL, "Restart")> <cfset OnApplicationStart()> <cfset OnSessionStart()> <cfcache action="flush" expireurl="*"> <h1> Site refreshed </h1> <em> Aborting your request now... </em> <cfabort/> </cfif>