Nobody has any opinions, good, bad, or indifferent?
domain.com/path/to/resource.json
just leave it like this:
domain.com/path/to/taffy/index.cfm?_resource=/path/to/resource&_representation=json
I've deliberately prefixed with underscore to help avoid the
collisions you mentioned before.
Yes, that's a hella ugly URL, but who cares. If you want pretty URLs,
there are myriad ways to get them, and better left to something more
suited for it than Servlet mappings, Application.cfc request thievery,
or JRun hackery. For example (using mod_rewrite):
RewriteRule ^(/path/to/[^.]+)(\.([a-zA-Z0-9])+)?$
/path/to/taffy/index.cfm?_resource=$1&_representation=$3 [PT]
Now the first URL will get to the second one. Or if you don't have
Apache and/or want to stay pure JEE, you can use UrlRewrite
(http://www.tuckey.org/urlrewrite/):
<rule>
<from>^(/path/to/[^.]+)(\.([a-zA-Z0-9])+)?$</from>
<to type="forward">/path/to/taffy/index.cfm?_resource=$1&_representation=$3</to>
</rule>
Same net result.
I should say that I gave up on PATH_INFO eight or nine years ago and
never looked back. It's probably been six or seven since I've even
seen a standalone CF install (the only place the JRun voodoo works).
Honestly, I've never missed it, and I refuse to believe that there are
a significant number of people who both a) don't use a webserver, and
b) can't drop in urlrewrite.jar and wire up the filter. If you can
tweak your web.xml, then you can add the UrlRewrite filter just as
easily as change the servlet mappings, so why not just do that?
The one sentence version is "it's pretty irrelevant what Taffy
supports because I'm not going to use it's in-built format for public
consumption" which I guess puts me in the indifferent camp.
cheers,
barneyb
--
Barney Boisvert
bboi...@gmail.com
http://www.barneyb.com/
Yes, thank you for the clarification, Adam! So this configuration will be required for CF10 (Zeus)... it will be running on Tomcat instead of JRun, correct?