>
> I want to use a relative path when instantiating a CFC.  Can this be done
> when using createObject()?  Can it be done at all?
>

It can't be done using relative notation. If the cfc is outside the root of
your application, you can use a ColdFusion mapping. If it is within the
root, a mapping is not required, i.e.

theAppRootFolder
--componentfolder
----mycfc.cfc
--anotherFolder
----myTemplate.cfm

anotherApplicationRoot
--myOthercfc.cfc

In myTemplate.cfm, you could use "compononentfolder.mycfc" to reference the
mycfc.cfc component becuase ColdFusion checks cfc paths relative to the
application root. If you wanted to instantiate the 'myOther.cfc' component
however, you would need to create a mapping to the 'anotherApplicationRoot'
folder then use 'myMapping.myOthercfc.cfc'.

Mappings are created in the ColdFusion administrator, or if you don't have
access you will need to put in a ticket with your host.

 You can also use something like ColdSpring to generate all your component
instances. You still need to create mappings, but it really is a great thing
so do check it out :)

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298797
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to