1
웹 페이지를 작성할 때 공통 리스프를 사용하여 빌드했습니다. 그러나 내가 얻는 것은 웹 페이지의 소스 코드입니다. 그러나 이맥스에 웹 페이지를 복사하고 다시 열면 작동합니다. 나는 무엇이 잘못되었는지 모른다. 혀짤배기에서내가 웹을 구축하기 위해 리스프를 사용할 때 뭔가 잘못되었습니다.
내 코드이 잘못 보이는
(defmacro standard-page ((&key title) &body body)
(with-html-output-to-string(*standard-output* nil :prologue t :indent t)
(:html :xmlns "http://www.w3.org/1999/xhtml"
:xml\:lang "en"
:lang "en"
(:head
(:meta :http-equiv "Content-Type" :content "text/html;charset=utf-8")
(:title ,title)
(:link :type "text/css" :rel "stylesheet" :href "/site.css"))
(:body
,@body))))
(hunchentoot:define-easy-handler (hello :uri "/hello") (name)
(setf (hunchentoot:content-type*) "text/plain")
(standard-page (:title "something new")
(:h1 "can i do this?")))
웹 서버가 Common Lisp을 실행하도록 구성되어 있습니까? – Chris