[plt-scheme] plt-web-server configuration

From: Marek Kubica (marek at xivilization.net)
Date: Sun Oct 26 13:10:34 EDT 2008

Hi Noel,

thanks for your help,

On Sun, 26 Oct 2008 12:02:13 +0000
"Noel Welsh" <noelwelsh at gmail.com> wrote:

> When creating instaweb we had to choose between supporting a single
> servlet or many servlets.  We realised that anything that we could do
> with multiple servlets we could do just as easily with a single
> servlet (since a servlet is just a function and it easy to write a
> function that chooses other functions based on some property (e.g.
> URL)) and supporting only a single servlet made instaweb much easier
> to write.


> So to solve your problem I would write some master "dispatch"
> servlet that calls all your current servlet based on URL. We have
> written another library, dispatch.plt, for just this purpose.

I just took a look at dispatch.plt. It reminds me of the dispatchers
known in other languages and might be quite useful when writing entire
sites which have more elaborate control-flow. But thats too much for me
at the moment - it seems too compilcated to write a dispatcher that
dispatches urls to files[1] containing the servlets when the normal web
server does exactly that. The only problem with the server is, that I
seem to be unable to launch it with my customized settings, as
described in my other mail.

regards & thanks for the untyped-code which might be indeed useful if I
decide to write bigger stuff in Scheme,

[1] I know PHP-style is definitely not elegant, but "drop the file in
the directory to get it served" is often quite convenient

Posted on the users mailing list.