Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0 RC2
-
Fix Version/s: 1.0
-
Component/s: Tag Library
-
Labels:None
Description
The tag library builds up HTML in a StringBuffer in memory, then flushes it all out to the response at once with a single out.write(buffer).
Would it be reasonable instead to write directly to the underlying response's JspWriter so that normal JSP buffering can take place?
for example, instead of
buffer.append(getHTMLData());
write(buffer);
you would have
writeHTMLData(writer);
writeHTMLData would return void instead of String, and all of the buffer.append()'s would change to writer.write(). Subroutines like String getTableFooter(), which are only called from getHTMLData, would similarly change to void writeTableFooter(writer).
Would it be reasonable instead to write directly to the underlying response's JspWriter so that normal JSP buffering can take place?
for example, instead of
buffer.append(getHTMLData());
write(buffer);
you would have
writeHTMLData(writer);
writeHTMLData would return void instead of String, and all of the buffer.append()'s would change to writer.write(). Subroutines like String getTableFooter(), which are only called from getHTMLData, would similarly change to void writeTableFooter(writer).