Sessions: without cookies? url rewrite?
Hi, what is in the future of using Sessions with Zope? I am mostly talking about the events of using session without cookies - and how do we pass the session id around? At the moment it seems that without cookies the id has to be included in the form or links manually - since there is no mechanism to do the same as in php's url rewrite. Has anyone yet solved this or is there any ways to go around this? -huima
Heimo Laukkanen <huima@fountainpark.org> writes:
At the moment it seems that without cookies the id has to be included in the form or links manually - since there is no mechanism to do the same as in php's url rewrite.
We used three methods: idUrl, idField and idRedirect in a project for that. All of them check if the Session-Id is from Cookies or Form variables - you have to set the preference for formvariables higher than cookies if you want cross site sessions. idField includes a hidden field in forms, if necessary (no cookies). idRedirect displays "hint page" with a link to the new destination if necessary and idUrl integrates the Session-Id in the URL if necessary. It's a lot of work to include this in every link, every form and every redirect :) Regards, Frank
I have the following code for alternate colored table rows. I do not want the Members folder to show in the list. When the exception is met 'alternate colored rows' skips a line I tried to alter sequence-index without succes. Suggestions? Viewing this without 'Members' folder present it renders like: Folders (hilite) 0 1 (hilite) 2 If there is a 'Members' folder present it renders like: 2 Folders (hilite) 0 2 Code: <dtml-in expr="objectValues( [ 'Folder', 'Portal Folder' ] )" sort="title_or_id"> <dtml-if sequence-start> <table> <tr class="row-hilite"> <td>Folders</td> </tr> </dtml-if> <dtml-if expr="id <> 'Members'"> <dtml-if sequence-odd> <tr class="row-hilite"> <dtml-else> <tr class="row-normal"> </dtml-if> <td> <dtml-var sequence-index> </td> </tr> <dtml-else> <dtml-let index=sequence-index index="index+1" sequence-index=index> <dtml-var sequence-index> </dtml-let> </dtml-if> <dtml-if sequence-end> </table> </dtml-if> </dtml-in> TIA, Roel.
Heimo Laukkanen writes:
what is in the future of using Sessions with Zope? I am mostly talking about the events of using session without cookies - and how do we pass the session id around? I would use an object similar to the VHM (virtual host monster) that checks for "SessionId/id" in the URL and ensures that "id" is used as session id.
Then, you need only a single redirect when the session is opened. After that, the session id is part of the URLs without further manual url rewriting. Dieter
participants (5)
-
Chris McDonough -
Dieter Maurer -
Frank Tegtmeyer -
Heimo Laukkanen -
Roel Van den Bergh