首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Hunchentoot/html-template/Lisp提供动态网页

使用Hunchentoot/html-template/Lisp提供动态网页
EN

Stack Overflow用户
提问于 2011-11-28 21:04:46
回答 1查看 431关注 0票数 1

以下使用Hunchentoot和html-template的代码允许我提供动态网页,直到最近我将Hunchentoot升级到最新版本。有人能建议我在下面的代码中哪里出了问题吗?我想问题出在宏定义上?

代码语言:javascript
复制
(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))))
EN

回答 1

Stack Overflow用户

发布于 2011-11-30 10:36:51

在升级到1.2.0版本后,我也遇到了一些Hunchentoot的问题。如果您像我一样实例化一个类acceptor的对象,则可能需要将其更改为使用类easy-acceptor。

代码语言:javascript
复制
(push (make-instance 'easy-acceptor) *acceptors*)

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8296191

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档