Monday, November 16, 2009

CFBarbecue.cfc (...Just because)

While experimenting with the Barbecue library last week, I put together a cfc for my testing. (You knew that was coming. It is the old developer story: read, test, build something, re-test). Anyway, I decided to post it for anyone else out there experimenting with Barbecue. The cfc can generate any of the 25+ barcodes Barbecue handles, with a full range of settings. (Rather than repeat the same code 25+ times, the cfc uses reflection)

Keep in mind the Barbecue library also includes servlet, which is extremely easy to use. Since I was using the built-in webserver at the time, the greatest challenge for me was figuring out how to add a servlet. Not surprisingly I did not find much in the way of documentation. But once I finally got it working, the servlet was a snap to use. Just a simple call to a url:

Download CFBarbecue.cfc (See the download widget on the right menu)

November 19, 2009: Updated source to include missing lib\jdom.jar. Note: This jar is only needed if you are using the JavaLoader and want SVG functionality.


Salman March 14, 2010 at 6:14 PM  

What exactly did you have to do to get the servlet to work? I've spent the last 8 hours googling and messing around with it and have not had any success. I'm running on IIS6/CF8. Thanks.

cfSearching March 18, 2010 at 2:42 PM  


I just used the supplied war file. It is by far the simplest option. The long hand way is to drop the servlet classes and jars into WEB-INF\classes and WEB-INF\lib. Then add the servlet information to WEB-INF\web.xml.


  © Blogger templates The Professional Template by 2008

Header image adapted from atomicjeep