[tbnl-devel] Problem with my tests
Edi Weitz
edi at agharta.de
Tue Jun 15 13:21:56 UTC 2004
On Tue, 15 Jun 2004 09:13:00 -0400, Nicolas Lamirault <lam at tuxfamily.org> wrote:
> i have defined this on clwl.lisp :
>
> (setq *dispatch-table*
> (nconc
> (mapcar (lambda (args)
> (apply #'create-prefix-dispatcher args))
> '(("/tbnl/clwl" main)
> ("/tnbl/clwl/login.html" login)
> ("/tbnl/clwl/about.html" about)))
> (list #'default-dispatcher)))
As the docs say in <http://weitz.de/tbnl/#*dispatch-table*>
"The dispatchers in *DISPATCH-TABLE* are tried in turn until one of
them returns a handler."
So it looks like in your case "/tbnl/clwl" will always match and
always return the MAIN function without a chance for the other
dispatch functions to be called. You should chance the order in your
dispatch table - make MAIN the last entry (or the one directly before
#'DEFAULT-DISPATCHER).
HTH,
Edi.
More information about the Tbnl-devel
mailing list