In my previous post, I did a very simple REST service using Adobe ColdFusion 10. The way ColdFusion handles REST-enabled services is via a pre-defined Servlet Mapping in web.xml that looks like this :-

<servlet-mapping id="coldfusion_mapping_15">

This Servlet Mapping has a URL Pattern which tells CF that any URL starting with “/rest” is to be treated as a REST service. However, if you feel the need to change it to something more appropriate, you simply change the url-pattern in {cfroot}/cfusion/wwwroot/WEB-INF/web.xml and restart ColdFusion Server. Here is what my modified Servlet Mapping looks like :-

<servlet-mapping id="coldfusion_mapping_15">

And I can now call my REST service with this URL

Tagged with:  

One Response to Changing the default URL pattern for REST Services in ColdFusion 10

  1. […] you want to change that, as detailed here, you can modify what URL it’s listening […]

Leave a Reply

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 445 other subscribers

© 2011 Anuj Gakhar
%d bloggers like this: