Cool Gadget of the Day: JTidy Servlet

JTidy is a port of w3’s HTML Tidy. It’s basically an HTML validation and pretty printing library. JTidy servlet provides tools for using it in a servlet container.

So, why is this cool? Well, jsp tags produce really awful whitespace. It makes looking through your generated markup almost impossible. JTidy servlet provides you with a drop in filter which you can just add to your site and cause all outgoing html to be pretty printed, making it readable. It’s about 4 lines of XML and two jars on the classpath and everything just works.

This entry was posted in programming and tagged , , on by .