Hi.
I have this piece of code:
----------------------------------------------------------------------------- (defpackage :web (:use :common-lisp :hunchentoot :cl-who :parenscript))
(in-package :web)
(start (make-instance 'acceptor :port 8000))
(push (create-prefix-dispatcher "/index.html" 'index) *dispatch-table*)
(defun index () (with-html-output-to-string (str) (:html (:head (:title "Test page")) (:body (dotimes (x 10) (htm (:p "Text")))))))
------------------------------------------------------------------------
and when I go to http://localhost:8000/index.html I get an error:
--------------------------------------------------------- Internal Server Error An error has occured. ------------------------------------------------------------
Where is the error in my code ? And where is the hunchentoot error log ?
Thanks
On Jun 16, 2010, at 1:59 PM, a wrote:
Hi.
I have this piece of code:
(defpackage :web (:use :common-lisp :hunchentoot :cl-who :parenscript))
(in-package :web)
(start (make-instance 'acceptor :port 8000))
(push (create-prefix-dispatcher "/index.html" 'index) *dispatch-table*)
(defun index () (with-html-output-to-string (str) (:html (:head (:title "Test page")) (:body (dotimes (x 10) (htm (:p "Text")))))))
and when I go to http://localhost:8000/index.html I get an error:
Internal Server Error An error has occured.
Where is the error in my code ?
This works for me using Clozure 64-bit on OSX, evaluating each form in Slime. What Lisp and OS are you using?
And where is the hunchentoot error log ?
You'll need to set hunchentoot:*message-log-pathname*.
Regards,
Patrick
This works for me using Clozure 64-bit on OSX, evaluating each form in Slime. What Lisp and OS are you using?
I'm using Lispworks on win xp.
These are the first three lines of error log
---------------------------------------------------------------------------------------------------
[2010-06-17 16:11:26 [ERROR]] The variable LET is unbound.
#<The WEB package, 3/16 internal, 0/16 external>
#<MP:PROCESS Name "Hunchentoot worker (client: 127.0.0.1:1112)" Priority 0 State "Running">
-------------------------------------------------------------------------------------------------------------------------
Can you tell me where is the error now ?
How can LET be a variable, it is a macro ?