--- Stuart Donaldson <[EMAIL PROTECTED]> wrote: > Awake and sleep are both called while in the forward() call to a new > servlet. The forwarding servlet (the one calling forward()) does not > > finish processing until after the forward() call is through, so the > forwarding servlet will not go to sleep until then. > > ServletA forwarding to Servlet B, the steps on the servlets are along > > the lines of the following with some processing left out. > > ServletA > A.awake() > A.respond() > ... process response and determine need to forward... > A.forward( URL to servlet B ) > createServletInTransaction() locates the servlet and > attaches it to the transaction. > B.awake(0 > B.respond() > B.sleep() > A.sleep() > > You can check request.parent() to see if you are in a forwarded or > included requestt, it returns the parent servlet, or None if there is > none. > > Note that this behavior is similar for forard() includeURL() and > callMethodOfServlet().
I am under the impression the sequence of calls described above does not apply to trans.response().sendRedirect(url). After calling trans.response().redirect(url) in a.awake(); a.respond(), and a.sleep() will run before b.awake(), b.respond(), and b.sleep(). Any output from "a" after calling redirect will be thrown away. The main difference between forward() and sendRedirect() is the browser's url will be updated with sendRedirect(). Is this correct? The new method Page.sendRedirectAndEnd(url) described in the RelNotes-0.8 document is probably more useful and less confusing than either sendRedirect() or forward() and probably deserves a mention in the User's Guide. Roger Haase __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel