[plt-scheme] web-server and load-configuration-sexpr

From: Aycan iRiCAN (aycan.irican at core.gen.tr)
Date: Fri Apr 27 07:22:12 EDT 2007

Jens Axel Søgaard <jensaxel at soegaard.net> writes:

> Aycan iRiCAN skrev:
>> Jens Axel Søgaard <jensaxel at soegaard.net> writes:
>>
>>> Hi Aycan,
>>>
>>>> I want to use "load-configuration-sexpr". Could you please give an
>>>> example? 
>>>>
>>>> Basically I have a default-host and a couple of virtual hosts. Besides
>>>> I want to attach a module to servlets namespaces.
>>> Just to make sure, I am on the right page. What are you trying to do
>>> exactly?  I believe it is rather seldom anyone needs to use
>>> load-configuration-sxexpr. Normally you'd just edit the configuration
>>> file - or use the web interface.
>>
>> Thanks for the reply Jens,
>>
>> I'm trying to reuse a servlet in multiple virtual hosts. Let me
>> explain more:
>>
>> I have written a simple file editor servlet (or a wiki with no markup
>> and entries mapped onto filesystem) which operates on a predefined
>> root path. It shows the list of files and directories and then you can
>> browse through the directories, view files, create new files etc...
>
> Interesting.
>
>> I want to reuse this servlet in each of my virtual hosts and I want
>> this servlet to operate on each virtual host's host-root path (besides
>> "the host-root of the current virtual host" is another question for a
>> servlet writer). The worst case, I can copy the editor servlet into
>> each of the virtual hosts servlet folder and edit the path by
>> hand. But there would be more modular solutions which I couldn't find
>> yet.
>
> Okay, that makes sense.
>
> A while I thought you coulds use the PLaneT system:
>
>   With the planet command line tool, you can associate a directory
>   with a owner+package+major version+minor version.
>
> But then I realized, you'd still need "dummy servlets" in each
> directory.
>
> The best example of dynamic configurations, I know, is Noel's
> instaweb:
>
> <http://planet.plt-scheme.org/package-source/schematics/instaweb.plt/1/6/instaweb.ss>
> <http://planet.plt-scheme.org/package-source/schematics/instaweb.plt/1/6/doc.txt>

Thanks for the references,

I tried below module to generate configuration. Could you please
comment on it?

http://paste.lisp.org/display/40397

I modified complete-configuration so that I can give proper keys to
build-configuration.

Best Regards

-- 
Aycan iRiCAN
KOR Bilişim Teknolojileri
http://www.core.gen.tr/


Posted on the users mailing list.