Questions tagged [application.cfc]

174 questions
18
votes
4 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,091
  • 14
  • 39
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
  • 6,948
  • 9
  • 44
  • 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
  • 14,482
  • 11
  • 60
  • 89
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,614
  • 2
  • 17
  • 21
8
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,410
  • 7
  • 45
  • 79
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
  • 1,877
  • 2
  • 23
  • 36
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
  • 454
  • 2
  • 8
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,734
  • 3
  • 19
  • 42
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…
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,027
  • 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,865
  • 2
  • 19
  • 32
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,171
  • 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
  • 9,645
  • 15
  • 67
  • 118
5
votes
2 answers

Rate Limiting Calls To an Api Using Cache in ColdFusion

Hi I am using ColdFusion to call the last.fm api, using a cfc bundle sourced from here. I am concerned about going over the request limit, which is 5 requests per originating IP address per second, averaged over a 5 minute period. The cfc bundle has…
namtax
  • 2,027
  • 5
  • 18
  • 25
1
2 3
11 12