Questions tagged [application.cfc]
176 questions
18
votes
5 answers
What's the ColdFusion 9 script syntax for cfsetting?
I'm trying to convert an Application.cfc to script. The original had this:
…

Micah
- 1,221
- 17
- 42
13
votes
4 answers
Extending application.cfc in a subdirectory
I have the following two files and would like the second to extend the first:
wwwroot\site\application.cfc
wwwroot\site\dir\application.cfc
However, when I go to declare the component for the second file, I'm not sure what to put in the extends…

Soldarnal
- 7,558
- 9
- 47
- 65
12
votes
1 answer
Do scheduled tasks load Application.cfc in the same way as web pages?
Do scheduled tasks load the Application.cfc in the same way as web pages? We have a task which runs nightly and needs to use a services cfc loaded into the application. Will the application scope exist in the same way as it does when calling a…

Nick Van Brunt
- 15,244
- 11
- 66
- 92
9
votes
5 answers
ColdFusion Application.cfc - order of execution
I need a reality check - and hopefully an explanation (if my reality is wrong).
The way the CF application framework evaluates things is this (my understanding)
- request is passed to cfserver
cf finds an application.cfm or cfc (based on traversing…

j-p
- 3,698
- 9
- 50
- 93
8
votes
1 answer
How can I get the application datasource name in Coldfusion 10?
In Coldfusion 9 to get the application datasource outside application.cfc, I've used application.getApplicationSettings().datasource.
In Coldfusion 10 getApplicationSettings() has been replaced with ApplicationGetMetadata().
So naturally I tried…

jan
- 2,879
- 2
- 19
- 28
7
votes
3 answers
Possible to create an unscoped global in application.cfc?
I'm migrating an old app that uses application.cfm to use an application.cfc. The CFM sets a few globals such as
I've tried putting that line of code in onApplicationStart, onRequestStart, etc. but trying to print that value…

DaveBurns
- 2,036
- 2
- 27
- 37
7
votes
3 answers
Variable scope in CF 10 versus CF MX7
I am running into a weird issue with my ColdFusion 10 code. I am new to ColdFusion, so go easy on me. The reason it is weird is because it does not seem to occur in older versions of this platform (i.e. MX 7).
A little info first:
I have two…

RyanCJI
- 464
- 2
- 8
6
votes
3 answers
Coldfusion "Routines cannot be declared more than once"
We have the following code in our Application.cfc:

Nicholas
- 1,974
- 4
- 20
- 46
6
votes
1 answer
Can onCFCRequest, or a similar function, be used to write data from a cfc to the caller request scope?
I'd like to initiate some logging of requests and, more importantly, queries within my application. Lucee makes this pretty easy, and I'm able to log all queries within any given page run with a few lines of code within the onRequestEnd…

Nicholas
- 1,974
- 4
- 20
- 46
6
votes
1 answer
ColdFusion: Are there any use cases where an Application.cfm is preferable to an Application.cfc
I'm in the process of upgrading a large legacy ColdFusion application that heavily utilizes Application.cfm template files instead of the newer Application.cfc files.
It seems that Application.cfc offer a cleaner more efficient solution to…

Hedge7707
- 557
- 1
- 5
- 17
6
votes
1 answer
How can one get a list of all queries that have run on a page in ColdFusion 9
I would like to add some code to my Application.cfc onRequestEnd function that, if a certain application variable flag is on, will log query sql and execution time to a database table. That part is relatively easy, since ColdFusion returns the sql…

Nicholas
- 95
- 3
6
votes
5 answers
CFC extends sibling folder
I've seen all kinds of solutions for extending cfcs in parent folders with access to parent files or the CF administration, but I have not seen a workable solution to extend a cfc in a "shared"/sibling folder without access to parent folders.
This…

Andir
- 2,063
- 1
- 15
- 22
5
votes
2 answers
where does a CFC get it's Application Scope
I have a group of CFC's that I access from two seperate Applicaiton scopes.
One /Application.cfc is in the Root.
The other Application is in /Admin/Application.cfc
The cfcs are in in /_cfc/
If I call a cfc (using createObject())from a page in (for…

Jason
- 1,957
- 2
- 20
- 34
5
votes
3 answers
Could not find the ColdFusion Component that exists
When I use the following locally for development it works, when it is in production it works most of the time, but every so ofter we get the following error using this code:
Code
CreateObject("component", "model.mThing.Thing");
Now the model…

ztatic
- 1,181
- 3
- 13
- 21
5
votes
3 answers
How to best create and store APPLICATION variables?
I am using ColdFusion 9.0.1
I am taking over a site and the guy before me created about 100 variables and put them into the APPLICATION scope. I believe that his 100 variables were continuously being overwritten with each page load.
Basically, he…

Evik James
- 10,335
- 18
- 71
- 122