Starting Swank when running under Tomcat

0 views
Skip to first unread message

Daniel Renfer

unread,
Dec 24, 2008, 2:41:14 PM12/24/08
to comp...@googlegroups.com
I have been struggling with a way to start swank so that I could
connect to my server that is running under Tomcat. I just got it
working to my satisfaction, so I thought I would share it so that
others my save the hair I lost getting this to work.

Put this in your Servlet.clj file:

(defonce *swank* (ref false))

(when-not (or *compile-files*
@*swank*)
(clojure.main/with-bindings
(ignore-protocol-version "2008-12-09")
(start-server "/dev/null" :port 4005 :encoding "iso-latin-1-unix"))
(dosync
(ref-set *swank* true)))

comments welcome. Share and enjoy.

James Reeves

unread,
Dec 28, 2008, 11:52:28 AM12/28/08
to Compojure
On Dec 24, 7:41 pm, "Daniel Renfer" <d...@kronkltd.net> wrote:
> I have been struggling with a way to start swank so that I could
> connect to my server that is running under Tomcat. I just got it
> working to my satisfaction, so I thought I would share it so that
> others my save the hair I lost getting this to work.

Thanks for saving people some hair :)

- James
Reply all
Reply to author
Forward
0 new messages