Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application.cfc not effecting subdirectories

Status
Not open for further replies.

mike2277

Programmer
Mar 25, 2002
54
0
0
US
I don't know much about using Application.cfc's rather than Application.cfm's but since it looks as if it's good practice to use the .cfc method I'm trying to convert to that.

I'm setting my datasource in my Application.cfc

So the top level Application.cfc sets <cfset request.dsn="eschool2">

It works just fine for all of my CF templates until I try using templates in my admin folder. For some reason my top level Application.cfc does not seem to be setting the dsn for my templates in subdirectories. (If I remove my Application.cfc file in my admin subdirectory it works fine. So it seems I can't have a top level Application.cfc and second level Application.cfc but that can't be true).

Anyone have any ideas?

 
When the request is made for a page, Coldfusion looks in the current directory for an application page, if it is found then it is included, if not then it goes up the chain to see if a parent folder contains one.

So if you have an application page in the root directory and also one in a subdirectory, calling a file in the subdirectory would result in only the subdirectory's application page being executed, not the parent.

When you add a different application page into a subdirectory, you are basically telling Coldfusion not to use the parent application file for that directory.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Thanks so much for the quick response!

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top