FWIW --- The following text is quoted straight from the CFMX Development
Guide that ships with CFMX7:
 
 
<!---
How ColdFusion MX finds and process application definition pages
ColdFusion MX uses the following rules to locate and process the
Application.cfc,
Application.cfm, and OnRequestEnd.cfm pages that define
application-specific elements. The
way ColdFusion MX locates these files helps determine how you structure
an application.
Each time ColdFusion MX processes a page request it does the following:
 
1. When ColdFusion starts processing the request, it does the following:
- It searches the page's directory for a file named Application.cfc. If
one exists, it creates a new
instance of the CFC, processes the initial events, and stops searching.
(ColdFusion MX
creates a new instance of the CFC and processes its initialization code
for each request.)
- If the requested page's directory does not have an Application.cfc
file, it checks the directory
for an Application.cfm file. If one exists, ColdFusion MX logically
includes the
Application.cfm page at the beginning of the requested page and stops
searching further.
- If the requested page's directory does not have an Application.cfc or
Application.cfm file,
ColdFusion MX searches up the directory tree and checks each directory
first for an
Application.cfc file and then, if one is not found, for an
Application.cfm page, until it
reaches the root directory (such as C:\). When it finds an
Application.cfc or Application.cfm
file, it processes the page and stops searching.
 
2. ColdFusion MX processes the requested page's contents.
 
3. When the request ends, ColdFusion MX does the following:
- If you have an Application.cfc, ColdFusion MX processes the CFC's
onRequestEnd method
and releases the CFC instance.
- If you do not have an Application.cfc, but do have an Application.cfm
page,
ColdFusion MX looks for an OnRequestEnd.cfm in the same directory as the
Application.cfm page ColdFusion uses for the current page. ColdFusion
does not search
beyond that directory, so it does not run an OnRequestEnd.cfm page that
resides in another
directory. Also, the OnRequestEnd.cfm page does not run if there is an
error or an
exception on the application page, or if the application page executes
the cfabort or
cfexit tag.
--->
 
HTH...
 
 
 
 
Robert Mansen
Electronics Engineer
WRALC/ITMS
Bldg 301 West
Room C09, Cube 20
Robins AFB, GA 31098
(478) 222-3156
 
-----Original Message-----
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 9:53 AM
To: CF-Talk
Subject: Application.cfc vs cfm
 
Say I have the following directory/file structure:
 
            
 
/root
 
-          Application.cfc
 
-          Index.cfm
 
/subdirectory
 
o         Application.cfm
 
o         index.cfm
 
 
 
My question is, since there is an Application.cfc in the parent
directory,
will the Application.cfm file be processed when calling
/root/subdirectory/index.cfm, or will the Application.cfc be read? I
know
when a .cfm and a .cfc reside in the same directory, the .cfc is used,
but
I'm not sure about the above situation.
 
 
 
Thanks,
 
 
 
Ray
 
 
 
 
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264441
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to