Question
Naming Components from the Application Root
My Coldfusion Web Root is: C:\ColdFusion8\wwwroot
My Application Root is: C:\ColdFusion8\wwwroot\mydomain.com
I have a component in my application called datasource and it is located at:
C:\ColdFusion8\wwwroot\mydomain.com\system\datasource.cfc
I want to be able to call this component based on my application root so that it can be referenced as "system.datasource". As that is the path to the component once I upload the site to my web host. Is it possible to do something to make this happen?
I have found that if I do the following in Application.cfc it makes it work, but I have a feeling this is not a recommended option:
<cfset this.customtagpaths = "C:\ColdFusion8\wwwroot\mydomain.com" />
Does that open me up to any problems or vulnerabilities?
The reason I do not want to use a mapping is that I am trying to make these components reusable for other applications as well, and if you use a mapping then the first part of the component name changes from app to app.
Any help or suggestions would be greatly appreciated. Thanks!
My Application Root is: C:\ColdFusion8\wwwroot\mydomain.com
I have a component in my application called datasource and it is located at:
C:\ColdFusion8\wwwroot\mydomain.com\system\datasource.cfc
I want to be able to call this component based on my application root so that it can be referenced as "system.datasource". As that is the path to the component once I upload the site to my web host. Is it possible to do something to make this happen?
I have found that if I do the following in Application.cfc it makes it work, but I have a feeling this is not a recommended option:
<cfset this.customtagpaths = "C:\ColdFusion8\wwwroot\mydomain.com" />
Does that open me up to any problems or vulnerabilities?
The reason I do not want to use a mapping is that I am trying to make these components reusable for other applications as well, and if you use a mapping then the first part of the component name changes from app to app.
Any help or suggestions would be greatly appreciated. Thanks!
