On Sep 28, 2004, at 5:18 PM, Geoffrey Knauth wrote:
> On Sep 28, 2004, at 4:34 PM, Ken Anderson wrote:
>> Could we get a servlet that only reads the file once? Or maybe even
>> never - it calls a function that its already loaded?
>
> I think it should be an option. load-always or load-once, so to speak.
I agree. We can work on it.
One method I have been using for static webpages that are build using
jscheme servlets
is to just use a website copier (e.g. wget -kmp --update-links
http://localhost:8080/mywebapp )
and then have a script that copies the website and moves these static
pages to an apache
server.
In the http://www.4collegewomen.org site there are both static and dynamic
pages so I have two variables
[dcontext] and [scontext] and use the wget to copy only the static
pages while leaving links to the
dynamic pages alone. The apache-served static pages then have links to
the Jetty-served dynamic
pages and we get good performance on static pages and OK performance on
dynamic pages
(which are used as often for that website).
I often work with the "founder" of the website (a public health
professional in Washington) by
phone and as we both view the website, I make changes to the dynamic
site, run the script to
copy it to apache, and she sees the changes almost immediately. its
pretty cool and really easy
from this side....
>
> At the customer site where I've been using JScheme servlets to demo
> screen designs and change them on the spot, it's been very nice that
> little tweaks to my html.scm and defs.scm "libraries" get reflected
> immediately in the browser, and fellow developers were impressed that
> I never had to stop/restart the Jetty server.
>
> I can see the value of load-once too, so long as there is a way to
> dump ("forget") something in memory dynamically so a new version can
> be loaded.
Yes, I do this on my sites using a "reload.servlet" at the top level
that I can call to reload the dynamic
environment that the servlets run in. That environment is initially
set up when the Scheme servlet is loaded
by calling some initialization code in WEB-INF/scheme/scheme.sss which
loads in the file in
WEB-INF/scheme/servletlib/init.scm and possibly elsewhere in WEB-INF.
---Tim---
>
> Geoffrey
> --
> Geoffrey S. Knauth | http://knauth.org/gsk
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on
> ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give
> us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
> more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Jscheme-devel mailing list
> Jscheme-devel@...
> https://lists.sourceforge.net/lists/listinfo/jscheme-devel
|