You can clone with
; Starts an JTornado HTTP Server and a sample RequestHandler.
; Bit verbose due to compilation directives. Recommendation is to generate
; a set of macros to hide this.
; Compiled and implements a static main method to start the server
(:import (org.jtornadoweb HttpServer)
(:gen-class :prefix "server-"))
(defn do-get [this]
"Handles the HTTP GET method"
(.write "hello clojure"))
(defn do-post [this]
"Handles the HTTP POST method"
(.write (.getArgument "name" "default" false)))
(defn server-main 
(.add (org.jtornadoweb.Web$Application.) "/" org.ctornadoweb.MyHandler)
false nil false) 8089))
;use (compile 'org.ctornadoweb)
The server still performs super.get(), what causes an error.
Include the hyphen in the do prefix: do-.
oh god! worked. Thanks
I'm not a clojure fan.. but JTornado is nice!
Hi Felipe. We are working hard to release the first stable version of JTornado. The idea is to kill all bureaucracy for Java on the Web. We still have the plan to rearrange the webframework (primarily written for java) to better fit other VM Languages like Groovy, Scala and Clojure.
Sure.. i wrote about that last year.. http://www.loogica.net/blog/2009/11/04/java-para-web-sem-servlets/ but my framework works with Jetty.. but JTornado is even better because it's (even) small (than jetty) and lightweight.. and combined with something like freemarker and some lightweight persistence framework can provide a very performatic, small yet powerfull solution to put java websites with minimum effort!