[hunchentoot-devel] Need help with basic dispatch

Hello All, I am new to Lisp and I have been playing around with Hunchentoot. I don't seem to be able to get dispatch to work. I've tried several things, but to no avail. Should the following code work or have I missed something? (defparameter *httpsd* (hunchentoot:start (make-instance 'hunchentoot:ssl-acceptor :port 4443 :ssl-certificate-file #p"/build/hunchentoot/server.crt" :ssl-privatekey-file #p"/build/hunchentoot/server.key" :document-root #p"/build/"))) (defun upload-message () (princ "Upload")) (push (hunchentoot:create-prefix-dispatcher "/upload" 'upload-message) hunchentoot:*dispatch-table*) A pointer in the right direction would be much appreciated. Thanks, Gerry

Gerry, hunchentoot:*dispatch-table* is part of the easy-handler framework ( http://weitz.de/hunchentoot/#easy-handlers). If you want to use it, you'll have to instantiate a hunchentoot:easy-acceptor or hunchentoot:easy-ssl-acceptor. HTH, Hans On Wed, Feb 13, 2013 at 10:27 AM, Gerry Weaver <gerryw@compvia.com> wrote:
Hello All,
I am new to Lisp and I have been playing around with Hunchentoot. I don't seem to be able to get dispatch to work. I've tried several things, but to no avail. Should the following code work or have I missed something?
(defparameter *httpsd* (hunchentoot:start (make-instance 'hunchentoot:ssl-acceptor :port 4443 :ssl-certificate-file #p"/build/hunchentoot/server.crt" :ssl-privatekey-file #p"/build/hunchentoot/server.key" :document-root #p"/build/")))
(defun upload-message () (princ "Upload"))
(push (hunchentoot:create-prefix-dispatcher "/upload" 'upload-message) hunchentoot:*dispatch-table*)
A pointer in the right direction would be much appreciated.
Thanks, Gerry _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel

Hi Hans, Thanks! It would have taken me a long time to notice that. You saved me many hours of frustration. Things are working well now. BTW: I read something about Hunchentoot having trouble with large file uploads. Is that still a problem? Thanks Again, Gerry From: Hans Hübner [mailto:hans.huebner@gmail.com] Sent: Wednesday, February 13, 2013 3:51 AM To: General interest list for Hunchentoot and CL-WEBDAV Subject: Re: [hunchentoot-devel] Need help with basic dispatch Gerry, hunchentoot:*dispatch-table* is part of the easy-handler framework (http://weitz.de/hunchentoot/#easy-handlers). If you want to use it, you'll have to instantiate a hunchentoot:easy-acceptor or hunchentoot:easy-ssl-acceptor. HTH, Hans On Wed, Feb 13, 2013 at 10:27 AM, Gerry Weaver <gerryw@compvia.com<mailto:gerryw@compvia.com>> wrote: Hello All, I am new to Lisp and I have been playing around with Hunchentoot. I don't seem to be able to get dispatch to work. I've tried several things, but to no avail. Should the following code work or have I missed something? (defparameter *httpsd* (hunchentoot:start (make-instance 'hunchentoot:ssl-acceptor :port 4443 :ssl-certificate-file #p"/build/hunchentoot/server.crt" :ssl-privatekey-file #p"/build/hunchentoot/server.key" :document-root #p"/build/"))) (defun upload-message () (princ "Upload")) (push (hunchentoot:create-prefix-dispatcher "/upload" 'upload-message) hunchentoot:*dispatch-table*) A pointer in the right direction would be much appreciated. Thanks, Gerry _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net<mailto:tbnl-devel@common-lisp.net> http://common-lisp.net/mailman/listinfo/tbnl-devel

On Wed, Feb 13, 2013 at 11:40 AM, Gerry Weaver <gerryw@compvia.com> wrote:
BTW: I read something about Hunchentoot having trouble with large file uploads. Is that still a problem?
I am not aware of any outstanding problems, but that does not mean that there exists none. Can you be more specific? What did you read and where? Thanks, Hans

Quoth Gerry Weaver <gerryw@compvia.com>:
[...] A pointer in the right direction would be much appreciated.
At some point you should also call TBNL:START. Seb -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap

Quoth Gerry Weaver <gerryw@compvia.com>:
[...] A pointer in the right direction would be much appreciated.
Whoops! Just noticed that you already call TBNL:START in your DEFPARAMETER form so ignore previous message. (TBNL is a nickname for HUNCHENTOOT, by the way). Seb -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
participants (3)
-
Gerry Weaver
-
Hans Hübner
-
Sebastian Tennant