From: Timothy H. <tim...@ma...> - 2003-01-16 04:43:21
|
On Wednesday, January 15, 2003, at 11:04 PM, root wrote: > I am working on a webapp and would like to have > a session persistance schemebean? I am not sure if > this is the proper term. The idea is to create > a jscheme instance, init it with state and procedures etc, > and then save it as a session object. Servlets could > execute eval methods on it like (.eval schemeObject args), Jscheme doesn't have first class environments for evaling into, but you can store Jscheme objects (lambda, lists, etc.) into session attributes: (servlet (a b c) (let* ((ses (.getSession request)) (mylambda (.getAttribute ses "mylambda"))) (if (equal? #null mylambda) (.setAttribute ses "mylambda" (lambda R .....))) ... (mylambda 123 'abc #(1 2 3)) .. )) > > This would let me put things like jdbc statements, > lambdas and such that could be shared among servlets in a > session. This lets you share Jscheme objects among servlets within a session but doesn't let you eval into an environment. You have to reconstruct the environment each time using .getAttribute ... > > What is the best way to do this or am I on the wrong track... does this help??? ---Tim--- > > thanks > davud > > > ------------------------------------------------------- > This SF.NET email is sponsored by: A Thawte Code Signing Certificate > is essential in establishing user confidence by providing assurance of > authenticity and code integrity. Download our Free Code Signing guide: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |