| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > Using ColdFusion components > Specifying the CFC location |
|
|
|
|
||
When you instantiate or invoke a component, you can specify the component name only, or you can specify a qualified path. To specify a qualified path, separate the directory names with periods, not slashes; for example, myApp.cfcs.myComponent specifies the component defined in myApp\cfcs\myComponent.cfc.
ColdFusion uses the following rules to find the specified CFC.
If you specify only a component name, ColdFusion searches each of these directories, in turn, for the component.
Note: If you use only the component name to specify the CFC, ColdFusion does not search the directories specified in the Administrator on the ColdFusion Mappings page. If you specify a qualified path that starts with a mapped directory name, ColdFusion does find the component.
If you specify a qualified path, such as myApp.cfcs.myComponent, ColdFusion looks for a directory matching the first element of the path in each of these directories (in this example, myApp). If it finds a matching directory, it then looks for a file in the specified path beneath that directory, such as myApp\cfcs\myComponent.cfc relative to each of these directories.
Note: If ColdFusion finds a directory that matches the first path element, but does not find a CFC under that directory, ColdFusion returns a not found error and does not search for another directory.
Note: On UNIX and Linux systems, ColdFusion MX attempts to match a CFC name or Custom tag name with a filename as follows: First, it attempts to find a file with the name that is all lowercase. If it fails, it then tries to find a file whose case matches the CFML case. For example, if you specify <cfobject name="myObject" Component="myComponent">, ColdFusion first looks for mycomponent.cfc and, if it doesn't find it, ColdFusion looks for myComponent.cfc.
|
|
||
| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > Using ColdFusion components > Specifying the CFC location |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/buildi12.htm
Comments
enderw88 said on Nov 8, 2003 at 7:31 AM :