以下使用Hunchentoot和html-template的代码允许我提供动态网页,直到最近我将Hunchentoot升级到最新版本。有人能建议我在下面的代码中哪里出了问题吗?我想问题出在宏定义上?
(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))))发布于 2011-11-30 10:36:51
在升级到1.2.0版本后,我也遇到了一些Hunchentoot的问题。如果您像我一样实例化一个类acceptor的对象,则可能需要将其更改为使用类easy-acceptor。
(push (make-instance 'easy-acceptor) *acceptors*)然后,您可以像以前一样继续使用create-prefix-dispatcher。
https://stackoverflow.com/questions/8296191
复制相似问题