struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Bathje" <...@ntsource.com>
Subject flushing output from custom taglib
Date Fri, 20 Feb 2004 03:16:41 GMT
Hey all.

Got another wacky question.

I am writing a custom tag library, and I want it to flush the buffer of html
out to the page as part of the processing. From what I can tell, either
pageContext.getResponse.flushBuffer(); or pageContext.getOut.flush(); should
do this, but I can't get either to. If for example I have in my doEndTag():

ResponseUtils.write(pageContext, "test1");
pageContext.getResponse.flushBuffer();
Thread.sleep(5000);
ResponseUtils.write(pageContext, "test2");
pageContext.getResponse.flushBuffer();
Thread.sleep(5000);
ResponseUtils.write(pageContext, "test3");

I would expect the "top portion" of the tile/page to be spit out along with
"test1", then a 5 second wait, then "test2" to be spit out, then the rest of
the page. Instead I get a 10 second (or so) wait, and the whole page spits
out.

using getOut.flush() results in the same behavior.

I am using tiles if it makes any difference...but any idea what I am doing
wrong here?

Matt Bathje


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message