At 05:31 PM 6/28/01 +0200, F. GEIGER wrote:
>After digging into the sources I found, why my cookies don't make it into
>the browser's cookies:
>
>Application.py:
>def forward(self, trans, URL):
> """
> Enable a servlet to pass a request to another servlet. The
> Request object
>is kept the same, and may be used
> to pass information to the next servlet. The next servlet may
> access the
>parent servlet through request.parent(),
> which will return the parent servlet. The first servlet will not
> be able
>to send any new response data once
> the call to forwardRequest returns.
> New Response and Transaction objects are created.
> Currently the URL is always relative to the existing URL.
> """
>
>So the call
>
>trans.application().forwardRequest(trans, 'PageCashDeskRegister.py')
>
>is the reason, because of
>
>*****The first servlet will not be able to send any new response data once
>the call to forwardRequest returns*****
>
>Sorry for bothering you all.
>
>Regards
>Franz
Ah, I ran into this problem too. My solution (some might call it a hack
:-)) was instead of setting the cookie directly, I saved the cookie
information into a particular Request field called "cookies". The Request
fields DO get preserved when you forward to another servlet. Then I added
a sleep() method to my SitePage that takes any cookies that were in the
request field "cookies" and actually sets them.
I don't have time to go into any more detail but if you really need to be
able to set a cookie and then forward to another servlet, this solution may
work for you.
--
- Geoff Talvola
[EMAIL PROTECTED]
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss