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:
http://127.0.0.1:8500/barbecue/?data=12345&type=PDF417
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.
2 comments:
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.
@Salman,
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.
HTH,
Leigh
Post a Comment