2011-11-28 19 views
0

以下使用Hunchentoot和html-template的代码让我可以为动态网页服务,直到最近我将Hunchentoot升级到最新版本。有人可以建议我在哪里出错的代码在下面?我认为问题出在宏定义上?使用Hunchentoot/html-template/Lisp服务动态网页

(defmacro define-url-fn ((name) &body body) 
    `(progn 
    (defun ,name() 
     ,@body) 
    (push (create-prefix-dispatcher ,(format nil "/~(~a~).html" name) ',name) *dispatch-table*))) 

(define-url-fn (sign-up) 
    (with-output-to-string (stream) 
    (let* ((values (list :username-error-msg *register-error*))) 
     (fill-and-print-template #p"/ELEPHUND/INTERFACE/sign-up.tmpl" values :stream stream)))) 

回答

0

我在升级到1.2.0后也遇到了Hunchentoot的麻烦。如果您正在实例化类接受器的对象,那么您可能需要将其更改为使用easy-acceptor类。

(push (make-instance 'easy-acceptor) *acceptors*) 

然后您可以继续像以前一样使用create-prefix-dispatcher