Hello Everybody,

I'm not sure that I am having a version problem but this very simple 
example does not work for me. I get the POST form but when I subit the POST 
back I do not see the variable content just a simple "The message was ::". 
I run it with "lein run". Any help will be greatly appreciated.

Here is the code:

project.clj

(defproject MyProject "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME";
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [
        [org.clojure/clojure "1.2.0"]
        [org.clojure/clojure-contrib "1.2.0"]
        [compojure "1.1.0"]
        [ring/ring-jetty-adapter "1.1.0"]
        ]
  :main MyProject.core
  )

core.clj

(ns MyProject.core
  (:use compojure.core ring.adapter.jetty)
  (:require [compojure.route :as route])
)

(defroutes example
  (POST "/" [message] (str "The message was :" message ":"))  
  (GET "/" [] "<form method=\"post\">
 Message: </br>
 <input type=\"text\" name=\"message\" value=\"\" />
 <input type=\"submit\" name=\"button\" value=\"send\">
       </form>"
  )
  (route/not-found "Page not found")
)

(defn -main [& args]
  (run-jetty example {:port 8080}))


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to