Unfortunately, this didn't work for me. The JSP doesn't print to the
browser....

It seems that a lot of people could use this functionality.  What confuses
me is that at one point with JRun build 131 it did indeed work. No matter
how much you printed to the PrintWriter, a sendRedirect would still work.
Perhaps this was a bug on Livesoftware's part - but it was a very useful
bug!  I wonder what changed this? Perhaps they are flushing the PrintWriter
differently?  I would love it if they could make a switch to turn that
off/on.  As long as the PrintWriter has not been flushed, I don't see why a
sendRedirect would not work?

Would others find this useful?

Neal

At 11:10 AM 4/29/99 -0500, you wrote:
>> -----Original Message-----
>> From: Neal Kaiser [SMTP:[EMAIL PROTECTED]]
>>
>>
>> 2) Somehow have my "out" PrintWriter really be a buffer. Then, when
>> everthing is done, print to the real output stream.  I'm not sure how
>> possible this would be....
>>
>Try this in your JSP....
>
><%
>PrintWriter oldOut= out;
>StringWriter stringWriter= new StringWriter();
>out= new PrintWriter(stringWriter);
>try
>{
>%>
>
>...all the usual stuff here
><Database Query is Done>
>Things printed to PrintWriter
><Another Database Query is Done>
>This printed
>...etc
>
><%
>out.flush();
>oldOut.write(stringWriter.toString());
>}
>finally
>{
>        out= oldOut;
>}
>%>
>
>I haven't actually tried this but I'm thinking that it probably will work.
>
>ted stockwell
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to