Data Streaming in JSP custom tag

We have a JSP custom tag which uses a StringBuffer object to store the HTML content. In the doEndTag method, we use the JSPWriter's print method to send the buffer's content to the browser.

Now, there are cases when the HTML content becomes very large,in the order of 1 - 10MB. In such cases, is there a way we can start streaming the data from the custom tag as the buffer is being built, rather than waiting for the entire buffer to be written out in the doEndTag.

[481 byte] By [bonzor100a] at [2007-11-27 6:42:25]
# 1
Yeah, just call the JSPWriter's print method instead of using the StringBuffer, or write your own subclass of StringBuffer (or StringBuilder if Java 5+) which will do this for you automatically when the size is at a certain point, and clear it out)
mchyzer1a at 2007-7-12 18:12:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...