> -----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

Reply via email to