Update: there is a way to extend the root Application.cfc without using a mapping. In your root directory, alongside your root Application.cfc, create ProxyApplication.cfc that contains just these two lines:
</cfcomponent>
c:/inetpub/wwwroot/domainname/Application.cfc c:/inetpub/wwwroot/domainname/ApplicationProxy.cfc c:/inetpub/wwwroot/domainname/admin/Application.cfc
The root level app.cfc runs just fine for the root level. The ApplicationProxy.cfc contains the following: <code><cfcomponent name="ApplicationProxy" extends="Application"> </cfcomponent></code The admin/Application.cfc starts off with <code><cfcomponent name="Application" output="false" extends="ApplicationProxy"></code>
When I run any page in the admin folder I get the following: "Could not find the ColdFusion Component or Interface ApplicationProxy."
I was entrenched in my app.cfm for so long and didn't want to make the jump b/c most of my apps have multiple levels of access just like this and I always came up lacking in the sub directories - but I just have to do it....
Also I am not sure if it matters but my root level app.cfc does contain the onrequest method and a way to remove it should the caller be a cfc. <code> <cfif listlast(arguments.thePage,".") is "cfc"> <cfset StructDelete(this, "onRequest") /> <cfset StructDelete(variables,"onRequest")/> </cfif></code>
Jsut hoping you can help shed seom light on it for me.
Thanks much! Chris
After nearly four years, I don't remember what setup I used to make that work (but I'm sure it was a default install - CF *used* to have a / mapping by default but it went away at some point).
But If I do exactly the same thing - it doesn't work. I know it must be something in my code - but any idea why no one seems to promote using that method in extending their app.cfc? Everywhere I look all I see is "extend it using the proxy.cfc method" But it seems like it is not really reliable. Just babbling now. Thanks for the response.
Chris
Chris, I couldn't get Sean's proxy method to work either after hours of head banging, but it did work using your simple idea of extends="RootAppName.Application" which I came across as I was about to give up. Maybe because Sean's method only works with CF6 since we're going back to 2005.
The Adobe CF docs don't explain how "extends" works particularly well. Glad it's sorted now. Luckily people don't shy away from commenting years after a blog entry is published. :-)


