From: Khookie
Subject: My little post: "Newbie's Guide to Lisp Web Programming on Windows"
Date: 
Message-ID: <1184730263.011226.39330@i38g2000prf.googlegroups.com>
Hi everyone

I've given up on Hunchentoot and other Lisp web servers for now... and
using clisp as CGI for Apache due to time constraints.

I posted some instructions on my blog @

http://technologyisart.blogspot.com/2007/07/setting-up-apache-with-clisp-cgi.html

if by chance newbies hang around this group and are interested.

Chris

From: Sard
Subject: Re: My little post: "Newbie's Guide to Lisp Web Programming on Windows"
Date: 
Message-ID: <1184860629.864356.210050@g4g2000hsf.googlegroups.com>
On 18 Jul, 04:44, Khookie <··········@gmail.com> wrote:
> Hi everyone
>
> I've given up on Hunchentoot and other Lisp web servers for now... and
> using clisp as CGI for Apache due to time constraints.
>
> I posted some instructions on my blog @
>
> http://technologyisart.blogspot.com/2007/07/setting-up-apache-with-cl...
>
> if by chance newbies hang around this group and are interested.
>
> Chris

Have you found a way to redirect errors to Stdin to ease debugging?
From: ··········@hotmail.com
Subject: Re: My little post: "Newbie's Guide to Lisp Web Programming on Windows"
Date: 
Message-ID: <1184912053.744900.244820@m3g2000hsh.googlegroups.com>
> Have you found a way to redirect errors to Stdin to ease debugging?

Atleast on my site errors from clisp is found in apaches error_log
From: ··········@hotmail.com
Subject: Re: My little post: "Newbie's Guide to Lisp Web Programming on Windows"
Date: 
Message-ID: <1184913458.178933.133570@o61g2000hsh.googlegroups.com>
Not sure if your hunchentooth problems was windows specific.

put the code below in web.lisp and load it:
sbcl --load web.lisp
browse to:
http://localhost:4444/mysite/
or
http://localhost:4444/mysite/runscript.lisp?hi=ho&ho=hi


(require :asdf)
(asdf:oos 'asdf:load-op :cl-who)
(asdf:oos 'asdf:load-op :hunchentoot)
(defpackage :web
  (:use :cl :cl-who :hunchentoot)
  (:export :load-web-dispatch :start))

(in-package :web)

(defmacro with-html (&body body)
  `(with-html-output-to-string (*standard-output* nil :prologue t)
     ,@body))

(defmacro =~ (str re)
  `(first (multiple-value-list (scan-to-strings ,re ,str))))

(defmacro x=~ (str re)
  `(second (multiple-value-list (scan-to-strings ,re ,str))))

(defun runscript ()
  (let ((hi (get-parameter "hi"))
        (ho (read-from-string (or (get-parameter "ho") "nil"))))
    (with-html
      (:html
        (:head (:title "myscript"))
        (:body
        (:a :href "/mysite/" "Back")(:br)
        (:h2 (fmt "hi: ~s, ~s" hi ho)))))))

(defun mysite ()
  (with-html
    (:html
     (:head (:title "mysite-title"))
     (:body
      (:h2 "My-site")))))

(defun load-web-dispatch ()
  (setf *dispatch-table*
        (nconc
          (mapcar (lambda (args)
                    (apply #'create-regex-dispatcher args))
                  '(("/mysite[/]$" mysite)
                    ("/mysite/runscript.lisp" runscript)))
        (list #'default-dispatcher))))

(defun start ()
  (start-server :address "127.0.0.1" :port 4444)
  (load-web-dispatch))