Copy link to clipboard
Copied
Having a problem linking my cfc file to a cfc file in another folder, for example. (goning to show it as i see it in DW)
One more thing i should add it that i am making this site on a local "test" machine (laptop).
Mywebsite
- cfc (Folder)
- myCFC.cfc
- results (Folder)
- index.cfm
That's pretty much it. Hope that clear enough.
I need to link the cfinvoke to the ( ../cfc/myCFC.cfc ). I tried (..cfc.myCFC), didn't work. Without the brackets of course.
You didn't say that the Mywebsite folder was in the ColdFusion wwwroot (which is probably your webroot). In that case, the path should be "Mywebsite.cfc.myCFC". Remember that CFC paths are relative to the webroot.
Copy link to clipboard
Copied
I believe CFC paths in cfinvoke are relative to the webroot (unless you are using a mapping), so you should only need "cfc.myCFC" for it to work.
-Carl V.
Copy link to clipboard
Copied
I did that the first time around and got this error.
Ensure that the name is correct and that the component or interface exists.
The error occurred in C:\ColdFusion9\wwwroot\Mywebsite\result\index.cfm: line 1
1. <cfinvoke component="cfc.myCFC" method="Search_Form" returnvariable="Result"/>
Copy link to clipboard
Copied
You didn't say that the Mywebsite folder was in the ColdFusion wwwroot (which is probably your webroot). In that case, the path should be "Mywebsite.cfc.myCFC". Remember that CFC paths are relative to the webroot.
Copy link to clipboard
Copied
That was the ticket. Thanks for your replies. *Thumbs up*
Find more inspiration, events, and resources on the new Adobe Community
Explore Now