Session without cookies.
Hi everyone, Is there possible to use a Session control without cookies? I already changed the browser_id_manager and unchecked the cookies and checked the "Automatically Encode Zope-Generated URLs With A Browser Id" option. But it's just stops working. :( In addition, where could I get the Examples? The Zope book has a mention of it, but I couldn't find the URL to download the Examples. Thanks! Fernando Lujan
On Mon, 2005-04-11 at 16:35, Fernando Lujan wrote:
Hi everyone,
Is there possible to use a Session control without cookies?
Yes.
I already changed the browser_id_manager and unchecked the cookies and checked the "Automatically Encode Zope-Generated URLs With A Browser Id" option. But it's just stops working. :(
Note that it says "Zope-generated" URLs. URLs that are not generated by Zope will not be encoded.
In addition, where could I get the Examples? The Zope book has a mention of it, but I couldn't find the URL to download the Examples.
Examples are available from the "Quick Start" page, which is available from the default index_html of your Zope root. - C
Chris McDonough wrote:
On Mon, 2005-04-11 at 16:35, Fernando Lujan wrote:
I already changed the browser_id_manager and unchecked the cookies and checked the "Automatically Encode Zope-Generated URLs With A Browser Id" option. But it's just stops working. :(
Note that it says "Zope-generated" URLs. URLs that are not generated by Zope will not be encoded.
The URL is generated by Zope. It's a simple code. I create two dtml documents with the following code. 1)test <dtml-call "SESSION.set('eg', 2)"> <dtml-call "SESSION.get('eg')"> <form action="test1"> <input type="submit" value="test1"> </form> 2) teste1 <dtml-call "SESSION.get('eg')"> The teste1 displays None, I expected it to display the number 2. :(
In addition, where could I get the Examples? The Zope book has a mention of it, but I couldn't find the URL to download the Examples.
Examples are available from the "Quick Start" page, which is available from the default index_html of your Zope root.
I didn't have the Examples directory under my Zope instance... :(
On Apr 11, 2005, at 23:47, Fernando Lujan wrote:
Note that it says "Zope-generated" URLs. URLs that are not generated by Zope will not be encoded.
The URL is generated by Zope.
It's a simple code. I create two dtml documents with the following code.
1)test
<dtml-call "SESSION.set('eg', 2)"> <dtml-call "SESSION.get('eg')">
<form action="test1"> <input type="submit" value="test1"> </form>
The URL "test1" in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect. jens
Jens Vagelpohl wrote:
1)test
<dtml-call "SESSION.set('eg', 2)"> <dtml-call "SESSION.get('eg')">
<form action="test1"> <input type="submit" value="test1"> </form>
It's a simple code. I create two dtml documents with the following code.
The URL "test1" in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect.
jens
Hum, I see. Just web pages that aren't dinamically generated by Zope. For instance, other DTML document will not keep the Session. Is this correct? I need to keep a SESSION through the entire site without cookies. Is that possible? Sorry if I made myself incomprehensible. Fernando Lujan
On Apr 12, 2005, at 1:02, Fernando Lujan wrote:
The URL "test1" in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect.
Hum, I see. Just web pages that aren't dinamically generated by Zope. For instance, other DTML document will not keep the Session. Is this correct?
No, you misunderstand what Chris said earlier. You need to let Zope generate the URL. In this case, instead of just saying... <form action="test1"> you could do <form action="<dtml-var "test1.absolute_url()">"> of course that's ugly because it looks like putting a tag inside a tag, ZPT is much nicer that way: <form action="" tal:attributes="action here/test1/absolute_url"> jens
Jens Vagelpohl wrote:
On Apr 12, 2005, at 1:02, Fernando Lujan wrote:
The URL "test1" in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect.
Hum, I see. Just web pages that aren't dinamically generated by Zope. For instance, other DTML document will not keep the Session. Is this correct?
No, you misunderstand what Chris said earlier. You need to let Zope generate the URL. In this case, instead of just saying...
<form action="test1">
you could do
<form action="<dtml-var "test1.absolute_url()">">
of course that's ugly because it looks like putting a tag inside a tag, ZPT is much nicer that way:
<form action="" tal:attributes="action here/test1/absolute_url">
Thanks, jens... Now I acquire my goal! ;) Fernando Lujan
participants (3)
-
Chris McDonough -
Fernando Lujan -
Jens Vagelpohl