Christoph Zwerschke wrote on 5/24/07 12:49 PM: > Ok, now I understand the problem better. Your cookies will probably > work, but only as long as you stay in the realm of one and the same > language, right? > yes, but we want the session to follow them when they switch languages.
> If you're doing things like that, one solution is to overwrite > Application.sessionCookiePath() e.g. by putting the following in the > __init__.py file of your default context: > > import new > > def contextInitialize(app, path): > app.sessionCookiePath = new.instancemethod( > lambda self, trans: '/', app, app.__class__) > > I think the best solution will be to add a "SessionCookiePath" setting > to Application.config. The default sessionCookiePath() method will then > evaluate that "SessionCookiePath" setting and use it, or if it is set to > None, then use the servletPath. > Thanks for the suggestion of overriding sessionCookiePath dynamically like that. I will test it out and use that for the near term solution. I think the new config setting would be fine, but I wonder if someone might want to ever choose that value at runtime, rather than force a constant value. One tangential thought - with all the new config settings lately, perhaps it should be easier to subclass the Application object. Or is that a can of worms that should stay closed? :) Regards - Ben ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss