Application.cfc question

2013-11-25 Thread Eric Roberts
Here's the background... We have all of our requests going through the index.cfm in the root and depending on variable values, they get directed, via cfincludes, to subfolders. My question is how do I get the application.cfc in the subfolder to run? The application.cfc in the root is getting

Re: Application.cfc question

2013-11-25 Thread Steve 'Cutter' Blades
to get the application.cfc in the subfolder to run, then your original request would have to be to the subfolder. CF bases which application.cfc to fire upon the originating request, then travels up the tree til it finds one (not down, as you are trying to do) Steve 'Cutter' Blades Adobe

RE: Application.cfc question

2013-11-25 Thread Robert Harrison
I would tend to agree that you cannot do it this way because the application.cfc fires on first request. If you can use IIS (or Apache) to do your redirect before the application.cfc fires you should be able to get the ones in the subfolders to fire first, then do an include at the top of

RE: Application.cfc question

2013-11-25 Thread Eric Roberts
That is what I was afraid of ;-) Thanks Steve! -Original Message- From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] Sent: Monday, November 25, 2013 12:34 PM To: cf-talk Subject: Re: Application.cfc question to get the application.cfc in the subfolder to run

Re: Application.cfc question

2013-11-25 Thread Jon Clausen
Short answer is, it’s difficult if you want to inherit the methods of the root folder Application.cfc. Coldfusion allows for one Application.cfc to extend another, but only if the inherited Application.cfc isn’t in the root directory of the site or has a mapping in the CF Admin ( i.e. -you

Re: Application.cfc question

2013-11-25 Thread Russ Michaels
: That is what I was afraid of ;-) Thanks Steve! -Original Message- From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] Sent: Monday, November 25, 2013 12:34 PM To: cf-talk Subject: Re: Application.cfc question to get the application.cfc in the subfolder to run, then your

Re: Application.cfc question

2013-11-25 Thread Byron Mann
If the purpose is code reuse, another possibility might be putting all logic into templates or other cfc. Then have both application.cfc call the required functionality through includes or method calls. Somewhat like a shared library. Byron Mann Lead Engineer Architect HostMySite.com On Nov 25,

Re: Application.cfc question

2008-11-24 Thread Martijn van der Woud
Just curious: can anyone tell a bit more on how exactly Application.cfc is executed? With normal cfc's I believe that the code above the first method runs only when a new instance of the cfc is created, or when the cfc is invoked as a static component. It seems a bit strange to me that the

RE: Application.cfc question

2008-11-24 Thread Dawson, Michael
, application.cfc is the same as application.cfm. Mike _ From: Martijn van der Woud [mailto:[EMAIL PROTECTED] Sent: Mon 11/24/2008 1:31 PM To: cf-talk Subject: Re: Application.cfc question Just curious: can anyone tell a bit more on how exactly Application.cfc is executed? With normal

Re: Application.cfc question

2008-11-24 Thread James Holmes
A new instance of Application.cfc is created and used on each request, which is why the code above the first method runs each time. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2008/11/25 Martijn van der Woud [EMAIL PROTECTED]: Just curious: can anyone tell

Application.cfc question

2008-11-22 Thread Dave Phillips
Hi - I'm trying to use application.cfc on a new app I'm building and I'm having a strange occurrence. I'm sure it's just because I'm not as familiar with it as application.cfm, but I am trying to 'avoid' just switching back to application.cfm. Here's the issue: I have the following code.

Re: Application.cfc question

2008-11-22 Thread Jochem van Dieten
On Sat, Nov 22, 2008 at 8:38 AM, Dave Phillips wrote: I have the following code. When I try to execute my URL with the reloadConfig=yes parameter, The app fails on the first line of the onSessionStart() function with 'application.datasource does not exist.' Since onSessionStart is called

Re: Application.cfc question

2008-11-22 Thread Nicholas Stein
I ran into the same problem. I assign datasource in the application.cfm and then lose the connection string in the cfc. I believe the problem is that a cfc is intended to run in a different machine as thought it were a web service. As a result Cold Fusion does not carry the application state

Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
Losers are hammering my site with spam in the urls. The first line is what my url should look like. The second line is what I am getting from the spammers. http://www.mydomain.com/index.cfm?type=Specialtyspec=110 http://www.mydomain.com/index.cfm?type=Specialtyspec=http%3A%2F%2Fwww.north

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Andy Matthews
[mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 8:15 AM To: CF-Talk Subject: Application.cfc question: Where would be the best place to put this code? Losers are hammering my site with spam in the urls. The first line is what my url should look like. The second line is what I am getting from

Re: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Brian Kotek
OnRequestStart would seem to be a good place for it. You might also override the Session timeout (if you're using sessions) so that these spam requests don't create a large number of dead sessions. You can set the timeout to 5 seconds or something before you do the redirect. Regards, Brian On

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 9:17 AM To: CF-Talk Subject: RE: Application.cfc question: Where would be the best place to put this code? That would be the most logical place to put it. I'm not sure that a cfabort is the best bet though. Why

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
, June 06, 2008 9:18 AM To: CF-Talk Subject: Re: Application.cfc question: Where would be the best place to put this code? OnRequestStart would seem to be a good place for it. You might also override the Session timeout (if you're using sessions) so that these spam requests don't create a large number

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Andy Matthews
a spammed link to get to your site. Why kill that legit request when you don't have to? -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 8:24 AM To: CF-Talk Subject: RE: Application.cfc question: Where would be the best place to put this code

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
OK. If I were to use a regex, should I still place the code in onRequestStart and use a re-direct with cflocation? -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 9:44 AM To: CF-Talk Subject: RE: Application.cfc question: Where would

Re: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Brian Kotek
[mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 9:18 AM To: CF-Talk Subject: Re: Application.cfc question: Where would be the best place to put this code? OnRequestStart would seem to be a good place for it. You might also override the Session timeout (if you're using sessions) so

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Andy Matthews
That makes sense to me. -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 8:54 AM To: CF-Talk Subject: RE: Application.cfc question: Where would be the best place to put this code? OK. If I were to use a regex, should I still place the code

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
[mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 9:58 AM To: CF-Talk Subject: RE: Application.cfc question: Where would be the best place to put this code? That makes sense to me. -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 8:54 AM To: CF

RE: Application.cfc question: Where would be the best place to put this code?

2008-06-06 Thread Che Vilnonis
Oops. Fixed it. Needed to add urldecode() to my conditional. -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 10:12 AM To: CF-Talk Subject: RE: Application.cfc question: Where would be the best place to put this code? OK. This is interesting

application.cfc question

2007-08-27 Thread Chad Gray
I am switching an application.cfm to application.cfc. Im my application.cfm I defined a function that I used through out the web site. cfscript function replaceQuotes(arg) { return Replace(arg, '', ##34;, ALL); } /cfscript Now in the application.cfc I cannot

Re: application.cfc question

2007-08-27 Thread Crow T. Robot
Plenty of ways to do this, but I'd probably create a utilities.cfc and then drop it into the application scope (in OnApplicationStart()). That way, anytime you want to use it on your site, you just call it that way. The added benefit is if you find you have more functions liek this that you may

Re: application.cfc question

2007-08-27 Thread Josh Nathanson
Plenty of ways to do this, but I'd probably create a utilities.cfc and then drop it into the application scope (in OnApplicationStart()). That way, anytime you want to use it on your site, you just call it that way. I concur with Crow - I was going to suggest exactly the same thing. You

nested Application.cfc question

2006-11-07 Thread Barthle, Robert \(Contractor\)
I am having a problem with nesting Application CFCs. I have an Application.cfc in the root directory with a call to onRequestStart, and in there I have a variety of variables set in the request scope. I have another Application.cfc in a sub directory that I built primarily to handle user

RE: nested Application.cfc question

2006-11-07 Thread Ian Skinner
I set it up so that this second Application.cfc extends the root Application.cfc by using the dot-notation mapping to the root Application - like extends=SharedSites.Site1.Application. In this file's onRequestStart function, I try and access the request scope variables set in the parent

RE: nested Application.cfc question

2006-11-07 Thread Barthle, Robert \(Contractor\)
I found the super.onRequestStart() function not too long after I sent this. That fixed that problem, you were correct about it. Thanks, Ian. :) Now my problem is just making this work correctly! It seems to be ignoring some IF statements in the child onRequestStart function, and I'm noodling