[plt-scheme] reloading servlets and modules

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Mon Dec 16 14:53:55 EST 2002

This issue has been brought up before, e.g.


but I didn't see any responses.

I'm starting to develop some servlets, and it's a little tedious to
have to visit the conf/refresh-servlets URL every time I want to test
some changes to the servlet.  Is there something I can put in the
servlet file to prevent the unit from being cached?  I'm guessing
there's no specific support for this, but I'm wondering if there's
some trick that I'm not thinking of.  Perhaps a "Refresh" button that
activated the refresh-servlets link, and then immediately reloaded the 
servlet page?  (I'd like to avoid Javascript if possible, although
this is mostly due to ignorance and laziness rather than any
specific aversion...)

Anyway, a similar but different problem is that if I'm developing a
support module, I have to restart the whole server (in fact the whole
Scheme process) if I want to make changes to a module.  Perhaps this
doesn't seem like such a terrible thing: I should be developing on a
private server, anyway, so if I have some public server that wants to
keep its session data as long as possible I will only need to restart
it when installing a new tested version of a module.  Still, it just
seems draconian to force a reboot in order to upgrade any component--
this isn't Windows!

I've tried re`load'ing the module file and requiring the module by
name, and this usually seems to work, but I'm a little wary of its
generality.  I guess another thing I could do is write a custom
module name resolver that doesn't cache modules, or perhaps checks
file timestamps to determine if a module should be reloaded.
Is this the right answer?  Has anyone else tried this?
What exactly is the "variant of `load/use-compiled'" that the
standard module name resolver uses?

--dougo at ccs.neu.edu

Posted on the users mailing list.