From: Alex Mizrahi
Subject: web-development in ABCL
Date: 
Message-ID: <2srf71F1omedtU1@uni-berlin.de>
hello

i've finally managed to write servlet for tomcat in abcl.

'main' function looks like:

(defun servlet1-service (request response)
  (with-simple-restart (abort "Abort servlet execution")
         (incf *hit-count*)
         (ServletResponse.setContentType response "text/html")
         (let ((out (ServletResponse.getWriter response)))
    (PrintWriter.println out "<html><body>")
    (PrintWriter.println out (format nil "helo from lisp. hit ~A"
*hit-count*))
    (PrintWriter.println out "</body></html>"))))

it can work with real java objects request and response, so it's not less
powerful than any native java servlet. (well, there can be some minor
difficulties - for example, i haven't found yet what to do with classloader
stuff).

i've also managed to make nice (IMHO) development environment - i can work
with sevlet code as with usual lisp program in xemacs/slime. it even goes
into slime debugger when something goes wrong, if asked to.

by the way, i found ABCL exceptionally stable and nice-behaving, despite
it's version is only 0.0.4) - if something goes bad, it crashes or hangs
locally, so it can be fixed. i feel like i had much more pain doing
development in CMUCL, CLISP and other mature lisp than in ABCL..

if somebody is interested in 'framework' for webdev in ABCL (it's java
servlet proxy and some helper code in lisp) i can put it somewhere when i'll
get it cleaned-up..

with best regards, Alex 'killer_storm' Mizrahi.