Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Application.cfc on test server

New Here ,
Apr 21, 2011 Apr 21, 2011

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

TOPICS
Getting started
720
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 21, 2011 Apr 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.Applicati

...
Translate
Guide ,
Apr 21, 2011 Apr 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 21, 2011 Apr 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 21, 2011 Apr 21, 2011
LATEST

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...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources