From: Bobby K. <bo...@us...> - 2002-05-28 19:08:46
|
Is there a simple way to execute a particular method when a session expires? Bobby Kuzma Senior Software Engineer | Internet Systems Adminstrator USA Computer Technologies 863.648.4443 |
From: Chuck E. <ChuckEsterbrook@StockAlerts.com> - 2002-05-29 03:58:53
|
On Tuesday 28 May 2002 12:09 pm, Bobby Kuzma wrote: > Is there a simple way to execute a particular method when a session > expires? > > Bobby Kuzma > Senior Software Engineer | Internet Systems Adminstrator > USA Computer Technologies > 863.648.4443 I created a Session.py file like so in .../MyApp/Web/Tools/ ----------------------------------------------- from WebKit.Session import Session as _Session class Session(_Session): def expiring(self): if not self.isExpired(): _Session.expiring(self) # do some stuff ----------------------------------------------- And in my context's .../MyApp/Web/Pages/__init__.py ----------------------------------------------- from Tools.Session import Session app._sessionClass = Session ----------------------------------------------- I tweaked sys.path in order that the directory containing Web/Tools became known. -Chuck |
From: David E. <da...@fa...> - 2002-05-29 21:22:27
|
Hi, Haven't really tracked down where and why this occurs, just want to check if anyone got some ideas what this could be. I'm using rewrites in apache to run my webware servlets directly under the root. Have different scripts that handles some http posts. So, if I make a post to a py servlet that only returns say one line of text - no other requests from the browser via the apache access_log. After that I either click a link or type in a new url within the webware site, this results in a weird (looks to me, broken log entry) in apache and apache/webware thinks the page I was looking for was "/GET"... Not so good explanation, I know. from apache access log, first line, my post, second line, my attempt to access another page. 127.0.0.1 - - [29/May/2002:16:36:18 +0200] "POST /login HTTP/1.1" 200 25 GET /coolpage/ HTTP/1.1" 404 18879 +0200] " it should have looked like this: 127.0.0.1 - - [29/May/2002:16:47:28 +0200] "GET /coolpage/ HTTP/1.1" 200 7377 I'm on mac os x and using explorer as browser. However, I managed to solve it by setting self.response().setHeader('Connection','close') /dave |
From: Aaron H. <aa...@me...> - 2002-05-31 02:47:24
|
In your __init__.py of your context directory write something like: from MiscUtils.MixIn import MixIn from WebKit.Session import Session import myLog class SessionMixIn: def expiring(self): print 'session started', self.creationTime() print 'ending session' if (self.hasValue('user')): username=self.value('user').name else: username='Anonymous' myLog.writeLog(username,'SessionEnd','Session has expired') # Now inject the methods from SessionMixIn into Session MixIn(Session, SessionMixIn) def contextInitialize(appServer, path): myLog.writeLog('application','startup','Application Started') myLog is myLogging module with the writeLog method that writes a log to my log. -Aaron ----- Original Message ----- From: "Bobby Kuzma" <bo...@us...> To: <web...@li...> Sent: Tuesday, May 28, 2002 3:09 PM Subject: [Webware-discuss] Triggering event on session expiration > Is there a simple way to execute a particular method when a session expires? > > Bobby Kuzma > Senior Software Engineer | Internet Systems Adminstrator > USA Computer Technologies > 863.648.4443 > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss > |