Hey Michael,
It looks like your issue is where you set the component path.

<cfset errorHandler = createObject("component",
        "ErrorHandler").init()>

Your setting up a mapping for your custom tags, but no mapping for your
component. 

Also, you may be aware of this but you can set global mappings in the
coldfusion administrator under the mappings tab.

-----Original Message-----
From: Dawson, Michael [mailto:[email protected]] 
Sent: Wednesday, June 24, 2009 1:59 PM
To: cf-talk
Subject: CF8 Uses Incorrect Component Path


On a single CF8 web server, I have a legacy web site that uses
Application.cfm along with a single global mapping and single global
custom tag path.
 
The server directory location for this web site is:
 
    D:\Inetpub\AceLink
 
The mapping is:
 
    / = D:\Inetpub\AceLink
 
The custom tag path is:
 
   D:\Inetpub\AceLink
 
I have an error handling component located at:
 
D:\Inetpub\AceLink\cfc\Utility\ErrorHandler.cfc
 
On this same web server, I have another web site that uses
Application.cfc and per-application settings.  Per-app settings is
enabled in the CF administrator.  CF is running as a single instance.
 
This site's directories are as follows:
 
E:\WebSites\applybeta.evansville.edu
E:\WebSites\applybeta.evansville.edu\Extensions
E:\WebSites\applybeta.evansville.edu\Extensions\Components
E:\WebSites\applybeta.evansville.edu\Extensions\CustomTags
 
I have a component at:
 
E:\WebSites\applybeta.evansville.edu\Extensions\Components\ErrorHandler.
cfc
 
That does it for the OS files.
 
Now, my simple Application.cfc contains the following code:
 
<cfcomponent output="false">
    <cfset this.name = "applybeta.evansville.edu">
    <cfset this.customTagPaths =
"E:\WebSites\applybeta.evansville.edu\Extensions\CustomTags,E:\WebSites\
applybeta.evansville.edu\Extensions\Components">
    <cfset errorHandler = createObject("component",
"ErrorHandler").init()>
    <p><cfdump var="#this#" label="this scope"></p>
    <p><cfdump var="#errorHandler#" label=""></p>
    <cfabort>
</cfcomponent>
 
When I execute this code, CF actually finds the component in the AceLink
directory rather than in the directory I have specified in the
this.customTagPaths variable.  I have proved this because a dump of the
"errorHandler" variable points to: cfc.Utility.ErrorHandler.  This leads
me to believe that CF is first looking in the global custom tag paths
directory before it looks in the per-application custom tag paths.
 
When I removed the global custom tag path that points to
D:\Inetpub\AceLink, the page breaks with the error that the component
cannot be found.  Now, this leads me to believe that I have a coding
error, but I have double- and triple-checked all of the paths.  The
paths, above, are copied and pasted into this message.  The same goes
for the Application.cfc code.
 
If anyone can see my problem, I would certainly appreciate it.  I'm so
close to this I probably can't see it right in front of me.  However, I
am expecting that this is a bug because I have several other web sites,
on this same server, that work as expected with Application.cfc and
per-application settings.
 
Thanks
 
Michael Dawson
Manager of Web Applications
Office of Technology Services
University of Evansville
 
Each time you send an email message with a background pattern
or loud background color, an endangered tree dies.
Please help us save a tree. Just say "NO" to email backgrounds.
 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323891
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