Hello JWT from Clojure
Recently I discovered JWt, a web toolkit written in Java. Despite not being a Java fan, I liked the concept and a link to a blog post by Raphaël Bauduin on using JWt with Clojure peaked my interest.
I read Raphaël’s account of how he got it working by trial & error and decided to copy the code into Eclipse & try it for myself. Alas, FAIL by bit rot. So I spent last night hacking away at Raphaël’s code & finally got it working around 1 AM.
Since Raphaël’s original experiment, Compojure was almost entirely rewritten, with most of the original functionality farmed out to other projects. Specifically, the ability to configure & start a Jetty server, which existed in the 0.3 branch, is now handled by jetty-wrapper. Lastly, I tweaked Raphaël’s code to make it more closely resemble the Java hello world example on the JWt site. It might be instructive to compare the Java and Clojure code provided below.

