jeby,
You can accomplish this several ways but first, I wanted to
note that I do not know of any specific vulnerabilities with adding
the custom tag paths to an Application. There certainly could be
and I'll leave that issue to anyone else that might have a more
knowledgeable opinion.
One approach I could suggest is to create a Virtual Host on
your development machine for each application on which you're
working. That's probably not the right lingo for IIS but here's
what I mean.
BTW - I'm guessing you're using IIS since your web and
application roots show a Windows system but the same basic
principles apply to Apache.
In IIS Admin, setup a new web site. Assign this site to a
custom domain name, such as dev.mydomain.com and point the site to
the application root directory you note in your original post.
Then, open the Windows Hosts file, which should be located in
C:\Windows\System32\drivers\etc (Wiki link about Host file:
http://en.wikipedia.org/wiki/Hosts_file).
Edit the host file so that your custom domain name is there.
Typically, this means adding a new line to the file with content
similar to the following:
127.0.0.1 dev.mydomain.com
Anytime you point the browser on your local machine to
http://dev.mydomain.com, the
host file will intercept the request and make your local IIS serve
the site.
As a result, the path system.datasource should begin its
search from the top domain directory (your application root) and
work down. This should work and mirror your production machine
based on your description.
If you want to have these components available across many
applications running on the same server, you can add them to a
"dedicated" directory on the server and create a global mapping in
the CF Administrator.
For example, I have a utilities folder on all my Windows
servers. This folder contains all sorts of CFCs I reuse (getting US
States and Canadian Provinces for a form select list, date/time
functions, etc.) across many applications. I have a mapping in my
CF Administrator(s) called ulitities, which points to the
aforementioned directory. In all my applications, I instantiate a
CFC from this directory as follows:
<cfscript>
myObj =
createObject("component","utilities.StatesAndCountries.States");
</cfscript>
Hope this helps!