I think you don't. 

But you can make a small piece of middleware that dispatches to a different 
handler based on the 'context root'. You can also strip off the context 
root as u dispatch the request to the correct handler. 

I'm doing something similar with virtual hosts. 

(ns net.umask.imageresizer.vhost)

(defn vhost-handler [vhosts]
  (fn [request]
    (let [hostname (:server-name request)
          handler (get-in vhosts [hostname :handler])]
      (if-not (nil? handler)
        (handler request)
        {:status 404
         :body "vhost config not found"}))))


Hope you can work with this. 



-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to