My penance for a silly mistake!

March 17, 2009

I spent several frustrating hours trying to figure out why my per application mappings, didn't work for my remote cfcs. Thankfully Matt Quackenbush pointed out my silly mistake. As penance I'm making myself write out this post!

In my Application.cfc I'd set up my mappings like this.


<cfset this.mappings = {} />
<cfset this.mappings = ExpandPath( "../shared/mappings/coldspring_1.2" ) />

The mappings were working as you'd expect, until I created a "webservices" directory in my webroot which I placed the cfcs I wanted to make available to remote services.

It hadn't occured to me that when ColdFusion was executing the ExpandPath() function, it wasn't calculating the path from the application root (where my Application.cfc is), it was doing it from the "webservices" directory.

So there you are penance complete, I won't make that mistake again!


No comments

Leave a comment

If you found this post useful, interesting or just plain wrong, let me know - I like feedback :)

Please note: If you haven't commented before, then your comments will be moderated before they are displayed.