The easiest way, add a mapping in App.cfc at the top, inside the component
but outside of any methods:
<cfset THIS.mappings["/cfc"] = Work out your path here>
Then:
<cfset myObject = CreateObject("component", "cfc.MyObject").init()>
Or how ever you wish to instantiate your objects.
Adrian
> -----Original Message-----
> From: John Barrett [mailto:[email protected]]
> Sent: 21 August 2009 23:55
> To: cf-newbie
> Subject: finding cfc
>
>
> How to I use cfinvoke to find a cfc?
> I have the cfc in:
> http://localhost/myApp/com/getLinks.cfc
>
> If I am in:
> http://localhost/myApp/Test
>
> I am using:
> <cfinvoke component="My.App.com.getLinks" I also tried at the CF Root.I
> am fine when everything is in the same directory, but when I put
> everything in the cfcs folder, it is not working.
>
> I tried another ways, but I think that the mappings start at the doc
> root?
> Is there a way to do something in the Application.cfc file, or will I
> have to do a mapping in the CF Admin?
> Thanks,
> JOhn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4745
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15