Crash Course In CFML & jsoup

Over the years I’ve made repeatable use of the jsoup library so I figured it’d be nice to put out a little primer on using it with CFML. What Is jsoup? From the official site: jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. [Read More]

Exposing Private Fields in Jsoup's Whitelist Class with Reflection

In recent days I’ve been trying to knock out some answers to questions on Stack Overflow. I’ve actually been pretty successful in helping some people out, so I’m happy about that. Two of the questions I ended up answering were in regards to using ColdFusion with Jsoup, a Java based Document Parser, and it’s Whitelist class in some strange different ways. By that I mean they wanted to gain access to data that isn’t freely exposed; and in most cases, I feel you really don’t need it to be. [Read More]

Repeating Watermark with ColdFusion & Java

Let’s make some watermarks with Java. This one’s been in the backlog of my mind for a good while now. It’s really a one situation tool, but it was cool as hell to dig into and figure out how to do it. I had to apply a watermark on a pretty large sum of images. ColdFusion makes this fairly easy. In the given scenario though, it wasn’t just a watermark; but a repeating watermark on a 45 degree. [Read More]

Preserving Order With Java's LinkedHashMap Class

The other night I ran into an issue with preserving order of keys and values being added to some ColdFusion structures. As it would be, structures in CFML don’t preserve data in any consistent order. It’s honestly something I’ve known about, but none the less, something that’s never given me hassle. With that faintly in the back of my mind, I did not accept it as such initially as when I wrote my code and ran it in ColdFusion 11, everything appeared in order (probably not the best route of thinking). [Read More]