Are you developing on the standalone CF server? If so, that may be why youre getting that behavior when you specify it in the CF Admin, but not at the application level. You may get that behavior if youre serving everything through the self-contained server, but that behavior wont carry over in to production if youre using Apache or IIS on the live server.
Coldfusion mappings are not designed for the purpose youre attempting to use them for. Not trying to burst your bubble or tell you how to code your app, but it would be much more reliable to set the image directory variable in the request scope and let CF set the path at runtime? -J On Nov 26, 2013, at 2:20 PM, Eric Roberts <[email protected]> wrote: > > Yes...cf does evaluate the img tag...as it has a mappiung in it...just as > it would evaluate it if there was a variable in the path to the image. So > yes...CF does evaluate html tags...whenever ther is a "/" in from of a > path...CF is supposed to recognize that as a mapping. If i sewt it up the > cf admin...it does do that. The problem is that i cant have a server wide > setting...it needs to be specific to my application. > > Eric > > > On Tue, Nov 26, 2013 at 1:17 PM, Eric Roberts < > [email protected]> wrote: > >> I know that...I was referring to what is rendered after the fact.When i >> click on image information, the image info should display the url with /er/ >> in it...not the other as that is part of the path from the root. >> >> Eric >> >> >> >> On Tue, Nov 26, 2013 at 1:13 PM, Adam Cameron <[email protected]> wrote: >> >>> >>>> I am trying to set up some local mappings (CF9) and it doiesn't seem to >>>> recognize it. I have this as part of several variables that are set >>> before >>>> the 1st function in my application.cfc... >>>> >>>> <cfset this.mappings[ "/cup" ] = "#application.cuproot#/cup"> >>>> >>>> >>>> >>>> For instance...when I try to access an image in a directory (the path >>> from >>>> the root is /cup/images/image.png), I call <img >>> src="/cup/images/image.png" >>>> />, instead of mapping it like i would expect it to, it just appends the >>>> server url and i get something like >>> >>> ColdFusion mappings are used by the ColdFusion server to locate files in >>> the file system, for like <cfinclude> and CFC pathing. They've got nothing >>> to do with URLs. You want to be setting up a web server virtual directory, >>> so when the browser requests a file on a given URL, the web server knows >>> where to find them. >>> >>> Reading this - to understand how CF / web server / client interact - >>> might help: >>> http://cfmlblog.adamcameron.me/2012/10/the-coldfusion-requestresponse-process.html >>> >>> -- >>> Adam >>> >>> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357153 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

