[Bese-devel] A newbie question
Rajappa Iyer
rsi at panix.com
Tue Jul 11 08:35:30 UTC 2006
I am sure that this must be the result of a boneheaded mistake on my
part, but for the life of me, I can't figure it out. So any help
would be most appreciated.
Platform: cmucl 19c on FreeBSD 6.1
In a directory hello-world, I have the following files (shown here
with contents):
hello-world.asd
(defpackage :hello-world.system
(:use :cl :asdf))
(in-package :hello-world.system)
(defsystem hello-world
:version "0.1"
:depends-on (:ucw)
:author "Rajappa Iyer <rsi at panix.com>"
:components ((:file "packages")
(:file "hello-world" :depends-on ("packages"))))
packages.lisp
(in-package :cl-user)
(defpackage :hello-world
(:use :common-lisp
:it.bese.ucw
:it.bese.arnesi
:it.bese.yaclml)
(:export :*hello-world-application*))
hello-world.lisp
(in-package :hello-world)
(defvar *hello-world-application*
(make-instance 'cookie-session-application
:url-prefix "/"
:dispatchers (list
(url-dispatcher "hello.ucw"
(call 'hello-world)))
:debug-on-error t))
(defcomponent hello-world (simple-window-component)
()
(:default-initargs :title "Hello!"))
(defmethod render ((h hello-world))
(<:p "Hello world"))
start.lisp
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :ucw)
(asdf:oos 'asdf:load-op :hello-world))
(setf ucw.system:*ucw-applications*
'(hello-world:*hello-world-application*))
(ucw:start-swank)
(ucw:create-server)
Then when I point my browser to http://localhost:8080/hello.ucw,
here's what I get in the REPL:
* 01:16 UCW.BACKEND/+INFO+: Handling request for "/hello.ucw"
01:16 UCW-LOGGER/+INFO+: URL-MATCHER matched against url-string: "hello.ucw".
01:16 UCW-LOGGER/+INFO+: ENTRY-POINT-HANDLER directing control to ACTION-HANDLER.
01:16 UCW-LOGGER/+INFO+: ACTION-HANDLER, handling action: #<Function "DEFVAR *HELLO-WORLD-APPLICATION*"
{49B0C309}>.
01:16 UCW-LOGGER/+INFO+: CALL'ing to /#<HELLO-WORLD::HELLO-WORLD {486FBAF5}>
01:16 UCW-LOGGER/+ERROR+: Got request error #<TYPE-ERROR {4870B875}>.
After which I have to abort the request.
What am I doing wrong?
Thanks,
Rajappa
--
<rsi at panix.com> a.k.a. Rajappa Iyer.
Absinthe makes the tart grow fonder.
More information about the bese-devel
mailing list