After my initial post yesterday CFX_CompareHTML ColdFusion HTML diff custom tag I got quite a bit of feedback and one of the items raised was that some people dont like CFX tags and I should use JavaLoader to use the JAR file from within ColdFusion. (Thanks Dan Vega)
I have uploaded a JAR file called CompareHTMLComponent which allows you to do this.
To call the diff component use the following:
<cfset paths = arrayNew(1)>
<cfset paths = expandPath("CompareHTMLComponent.jar")>
<cfset loader = createObject("component", "javaloader.JavaLoader").init(paths)>
<cfset compareComponent = loader.create("CompareHTMLComponent")>
<cfset diff = compareComponent.init()>
As always, feedback is most appreciated so hit me with your thoughts in the comments!
The JAR file and examples can be downloaded from here :
Requires Java 1.5 JRE to be installed or it will throw an exception! ColdFusion 8 & Railo 3 should have this but CFMX7 may not.