I'm using the cfinvoke tag to invoke a component. Goes something like: cfinvoke="includes.components.mycomponent" It works fine when in a file located in the root directory. I've got files that are located in a subdirectory of the root, other than the includes directory. How do I refer to the component from another subdirectory? In a php include, it would have been easy, "../includes/components/mycomponent.php", but I'm not sure how to do the same using the cfinvoke tag. Thanks for the help!
I don't think cfinvoke or createObject allow relative paths. Afaik you must use the full path <cfinvoke="full.path.to.component.mycomponent" ...> One option is to store the root path in an application variable and use it in your code. So if you ever have to change the path, you only need to do it in once place. <cfinvoke="#application.cfcRootPath#mycomponent" ...>
Thanks for the response. I'm trying to use this now: <cfinvoke component="#AppRootPath#includes.components.database" method="ReturnQuery" argumentcollection=#Qry# returnvariable="QryResults"></cfinvoke> Code (markup): where #AppRootPath# is "oracle.FUSD.www.flightwx." This should be the full root path. I still get this error Could not find the ColdFusion Component oracle.FUSD.www.flightwx.includes.components.database Like I mentioned before, I have a "sections" subdirectory and a "includes" subdirectory in my root directory. This file is in the "sections" subdirectory, and the component is in the "components" subdirectory of the "includes" directory. Thanks!
The path is generally a CF Mapping to either a folder that is outside the webroot or the dot-notation path to a subfolder of the webroot. What is your webroot and where are your components located? Example: CF webroot: / physical path: c:\cfusionmx7\wwwrooot components are located: c:\cfusionmx7\wwwrooot\includes\components