Jaroslaw Zabiello wrote:
> On Saturday 23 viii 2003 at 21:12:48 I wrote:
> 
>> I read about self.forward('AnotherServlet') the following sentence:
> 
>>   "When that servlet is done, control returns to the calling servlet,
>>   but all response text and headers from the calling servlet are
>>   discarded"
> 
>> It is not true. The control does NOT return to the calling servlet
>> for .forward('AnotherServlet') method. It returns only for
>> .includeURL('AnotherServlet'), not for forward method.
> 
>> ...
>> self.application().forward(self.transaction(), 'AnotherServlet')
>> open('c:/TestCache.log', 'a').write('>>I am back!!\n')
> 
>> Nothing is added to my log file. :(
> 
>> ...
>> self.application().includeURL(self.transaction(), 'AnotherServlet')
>> open('c:/TestCache.log', 'a').write('>>I am back!!\n')
> 
>> The log file is changed.
>> Is it a bug or I sth. misunderstood?
>> BTW, I was using today's WebKit CVS.
> 
> I did some tests and I found the control returns to the calling
> servlet but not in the way I thought. Second servlet ends with
> exception and the cotrol returns directly to awake() method.

This has changed since Webware 0.8.  In Webware 0.8, control would return to
the calling servlet and then any output made by that servlet would be
magically discarded.  In Webware CVS, forward raises an EndResponse
exception so the rest of your servlet after the call to forward() is
skipped.  Usually these two behaviors amount to the same thing, but not
always.

I need to update the documentation so that this is made clear.

I prefer the new behavior (that's why I implemented it), but does anyone
else have any opinion?  It could be switched back to the old behavior
without too much trouble.

- Geoff


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to