The suggestion for a mapping is a good solution.  Just so you know some
alternatives.....

>From index.cfm you can say:

createObject("component","cfc/mycfc");

Unfortunately, if you had:

/versionX/foo/index.cfm
/versionX/cfc/mycfc.cfc

You CANNOT do from /foo/index.cfm:

createObject("component","../cfc/mycfc");

[Which I consider to be a major bummer]

Some folks like to use a variable for the CFC root to, so you could have:

application.cfcRoot = "versionX.cfc.";

Then, call:

createObject("component",application.cfcRoot & myCFC);

That assumes the the versionX folder sits off the CF web root (or, you could
put the CFCs for each in a Custom Tag path).

(You might also consider having a build process actually build your code to
have that end up hard-coded with the VersionX)

There are also (officially) undocumented ways to call a CFC using an
absolute file path using the coldfusion.runtime.TemplateProxyFactory
(TemplateProxy in pre-6.1), but that should only be used when absolutely
necessary, IMO.





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of webguy
> Sent: Friday, August 15, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] cfc path question
>
>
> If I have different builds of an app e.g.
>
> /version1/cfc/mycfc.cfc
> /version1/index.cfm
>
> /version2/cfc/mycfc.cfc
> /version2/index.cfm
>
> in my web root and want  /version1/index.cfm to use cfc/mycfc.cfc (in
> version1) and /version2/index.cfm to use cfc/mycfc.cfc (in
> version2) want do
> i need to do?
>
> Thanks WG

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

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

Reply via email to