• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. The Fusebox Framework > Starting the Request

Starting the Request

In Chapter 1, “The Arrival of Fusebox,” we discussed the basics of Fusebox and how all page requests go through the index.cfm. All <href> links, form actions, JavaScript redirects, <cflocation> tags, and <cfmodule> tags should point to index.cfm. But how do we guarantee that? Aren’t there problems if a user requests qry_DeleteUser.cfm directly from a browser? At best, the misguided user sees an error message. At worst, the user is able to delete users in the system. How do we fix this problem?

Application.cfm Always Runs First

There is a template that ColdFusion processes with each page request: Application.cfm (the capital “A” is for UNIX case sensitivity). In fact, ColdFusion processes Application.cfm before processing any other template. You request http://www.thirdwheelbikes.com/index.cfm, and ColdFusion processes the Application.cfm file in the same folder as index.cfm first. If ColdFusion cannot find a file named Application.cfm, then the processor looks in the next highest folder. In our case, if http://www.thirdwheelbikes.com/index.cfm were in c:\inetpub\wwwroot\, ColdFusion would first look in the web root— c:\inetpub\wwwroot\. If there was none to be found there, ColdFusion would then look in c:\inetpub\.If no Application.cfm was found there either, ColdFusion would look in c:\. If any Application.cfm file was found in any of those folders, ColdFusion would stop looking up the tree.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint