Some options to consider:

1) Use a CF mapping to refer to your CFC locations -- then you have a separate mapping 
for each site (and the code will need to reflect that).  Assuming you have access to 
the CF admin, that's probably your best bet.

2) Set up your .cfm pages such that they are always in a directory above where your 
CFCs are --- you can then use relative paths to call your CFCs (but you can't, 
unfortunately, use a relative path above the calling page like "../../cfc/myCFC").

3) Use the hack that instantiates CFCs from an absolute path.  For instance, using 
something like http://cflib.org/udf.cfm?ID=900.

It's really too bad that relative paths and/or something akin to CFIMPORT don't work 
for CFCs.





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, June 09, 2004 3:39 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] CFC File Organization
> 
> 
> 
> Iâm having trouble with the best way to setup my file structure 
> for using CFCs.  This is how Iâve got it setup right now 
> (directories are in all caps):
> 
> - SITEROOT
>   - COM
>     - SITE
>       - myCFC.cfc
>   - pageToCallCFC.cfm
>   - CONTENT
>     - anotherPageToCallCFC.cfm
> 
> The way it is setup now, "pageToCallCFC.cfm" can find the 
> "myCFC.cfc" file without any problem but if I copy its contents 
> into "anotherPageToCallCFC.cfm" I get an error message saying 
> that it could not find the component.  Is there a way to set 
> things up so pages not in the root folder can find my CFC's?  I 
> know I can set a Custom Tag Path to point at "SITEROOT" and then 
> the CFCs are found no problem but I would like to use two 
> versions of the same package of CFCs on two different sites 
> running on the same server so that won't work.  Any ideas?
> 
> Stephen
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[EMAIL PROTECTED]
> 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to