[plt-scheme] web-server servlet components not reloading

From: Daniel Silva (dansilva at lynx.dac.neu.edu)
Date: Sun Aug 11 18:30:42 EDT 2002

After many failed attempts to run mzscheme in my host in order to use
scheme CGI, I gave up and installed mzscheme right in my ~/web
(actually ~/web/cgi-bin/plt) and told it to look for servlets in ".",
which then forces me to put my servlets in ~/web/servlets.
So in using servlets instead of CGI, I wanted to have simply a wrapper
servlet for my cgi script:

my-servlet.scm :

(require (lib "unitsig.ss")
         (lib "servlet-sig.ss" "web-server")
         "../cgi-bin/welcome-content.scm")

(unit/sig ()
  (import servlet^)

  (welcome-content '(("Home" "/")))
)


where welcome-content.scm exports a welcome-content function that takes
a menu assoc list and generates an html x-expr, etc..

this worked fine, but when updating welcome-content.scm, I have to kill
the server and restart it manually (the "refresh servlets" link in the
configure pages doesn't work).  I guessed this was because
welcome-content.scm wasn't in the servlets directory.  So I moved it to
the servlets directory and tried the same (after changing the path in
the require).  The refresh link still does not work.  Apparently it only
refreshes the actual servlets and not anything it requires, so I would
have to make welcome-content.scm a servlet itself and link to that
instead of my-servlet.scm in my web site.  This is a bit inconvenient,
especially when I have a styles.scm module that houses site-wide
variables for logos, style sheets, defaults, etc, and it would not be
refreshed until I killed the server by hand in the shell.

I would rather run scheme CGI through my host's apache instead of
loading the plt web-server on some weird port, but the server refuses to
execute mzscheme, so I am stuck with servlets.

Can I not reload all the required modules without nuking the service or
am I missing something?

-----------------------------------
Daniel Silva
dsilva at ccs.neu.edu
 





Posted on the users mailing list.