The amazing adventures of Doug Hughes

This tidbit just in: if you’ve had an issue where you have things in mappings (like ColdSpring, for example) and you’re having issues with those mappings resolving correctly while hitting CFCs via the built-in Flash Remoting gateway that comes with ColdFusion, try this:

Open {cf install dir}/web-inf/flex/remoting-config.xml and change




(line 24 in my remoting-config.xml file).

Restart your ColdFusion instance.

Test your Flex app with your CFCs in a mapped location instead of in the webroot.

It works? Great!

Why? Well, lets assume you’re trying to find a file via expandPath(“/coldspring”)… as near as I can tell, with that setting set to true, the remoting gateway will simply slap /coldspring onto the end of the webroot path and look in that directory, say “c:inetpubwwwrootcoldspring” when /coldspring is mapped to “c:webdevexternalcoldspring”. The remoting gateway never checks to see if there is a mapping called coldspring, it just assumes that / means “webroot-relative”. With that setting on, however, the remoting gateway checks with CF to see if there’s a /coldspring mapping before it does anything with the webroot path.

There’s some question as to why it is an issue with instantiating a CFC vs once the CFC has been instantiated… apparently once you’ve instantiated the CFC it works fine. I’m assuming that it’s because the gateway servlet is involved at first, and then the CFC servlet. The CFC servlet works fine and once it’s in control of the CFC it resolves paths correctly.

Just a guess, but it’s the only reason I see that things would behave the way they do.

Best of luck with this…

Comments on: "Having issues with CF mappings and Flash Remoting? Try this." (2)

  1. Matt Woodward said:

    I think you left out a key part. 😉 Relatively self-evident, but you want to change from false to true (as opposed to changing it from true to false) I believe.


  2. Jared Rypka-Hauer said:


    Thanks for pointing that out, Matt… it’s now fixed.



Comments are closed.

Tag Cloud

%d bloggers like this: