Skip to main content
Known Participant
April 21, 2011
Answered

Application.cfc on test server

  • April 21, 2011
  • 2 replies
  • 779 views

Hello,

I'm using Application.cfc on local server for testing, and I'd like to test my site in a subfolder "/beta" on the remote server.

I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.

I think with Application.cfm would be easier: if there's none in that folder, the app looks for the above folder, and so on. So I could move folders without hassle.

But I need Orm also...

Any suggestion?

Thanks

This topic has been closed for replies.
Correct answer Adam Cameron.
I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.

The file in /beta/admin still needs to be Application.cfc.  Just because you have another file in that dir that extends your root Application.cfc... doesnt mean CF knows to look for it.  CF looks for Application.cfc, not ApplicationProxy.cfc.

The Application.cfc in /beta/admin should extend beta.Application.

--

Adam

2 replies

Adam Cameron.Correct answer
Inspiring
April 21, 2011
I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.

The file in /beta/admin still needs to be Application.cfc.  Just because you have another file in that dir that extends your root Application.cfc... doesnt mean CF knows to look for it.  CF looks for Application.cfc, not ApplicationProxy.cfc.

The Application.cfc in /beta/admin should extend beta.Application.

--

Adam

SilvestroAuthor
Known Participant
April 21, 2011

Actually I remembered I use the same application name because I want to share session values between the main application, and the admin folder... What a mess...

Owainnorth
Inspiring
April 21, 2011

There's no reason an App.cfc would automatically extend another unless you've explicitly told it to, are you sure your App.cfc in /beta isn't set to inherit anything?

The way you have it set up should work perfectly, as long as you've got a different this.Name for each Application? If you've copied the App.cfcs around you may have inadvertently named the two Apps the same.

O.