Prev: 1e-7 evaluates to 0
Next: hunchentoot start
From: vanekl on 9 May 2010 13:22 "Haris Bogdanovi�" <fbogdanovic(a)xnet.hr> wrote in message news:hs6iib$bt9$1(a)gregory.bnet.hr... > Hi. > > I wrote a cgi script like this: > > ------------------------------------------ > > #!c:/lisp/clisp/clisp.exe > > (load "c:/lisp/clisp/asdf.lisp") > (push "c:/lisp/clisp/asdf-reg/cl-who/cl-who" asdf:*central-registry*) > (asdf:oos 'asdf:load-op 'cl-who) > > > (defpackage :a > (:use :cl :cl-who)) > > (in-package :a) > > (with-html-output (*standard-output* nil :indent t) > (:html > (:head > (:title "Test page")) > (:body > (:p "CL-WHO")))) > > ------------------------------------------------------------- > > and page looks like this: > > --------------------------- > > <html> > <head> > <title> > Test page > </tiitle> > </head> > <body> > <p> > CL-WHO > </p> > </body> > </html> > > ----------------------------- > > instead of just > > ---------------------- > CL-WHO > ---------------------- > > It looks like apache took literally this html code ? You can save yourself some typing by moving common code into an init file. The following is an example (on linux). ------------------ #!/usr/bin/clisp -q -q -i /home/me/dev/lisp/.apache-mod-init (in-package :a) (use-package :cl-who) (with-html-output (*standard-output* nil :prologue t :indent t) (:html (:head (:title "Test page")) (:body (:p "CL-WHO")))) ------------------ $ cat .apache-mod-init (in-package :cl-user) (defpackage :a (:use :cl)) (in-package :a) (pushnew #P"/usr/local/lib/sbcl/site-systems/" asdf:*central-registry*) (defmacro snuff-stdout (&body body) `(let ((*standard-output* *standard-output*)) (setf *standard-output* (make-string-output-stream)) ,@body)) (snuff-stdout (asdf:oos 'asdf:load-op 'cl-who))
From: Captain Obvious on 10 May 2010 05:25
HB> It looks like apache took literally this html code ? No, the problem is that browser did not know it is HTML code -- you didn't say that it is. It is important to understand this difference. |