Community
Participate
Working Groups
The class HtmlResponseWriter has been designed to assemble an HTML page. Actually, it is now being used only to render JavaScript responses. It contains a number of unused methods and is not streaming-capable. After cleaning up and renaming this class, it should be possible to pipe the rendered strings directly to a wrapped writer (the servlet's writer). This would simplify connecting the new protocol writer (bug 311355).
Removed all unneeded methods from class HtmlResponseWriter and renamed it to JavaScriptResponseWriter to reflect its only current purpose. It should now be easy to change it to direct streaming mode. However, this should be done together with the protocol changes. Changes are in CVS HEAD.
Why do the write-methods throw an IOException? None of the called methods in those write-methods do throw an IOException?
The write method throw IOException for historical reasons (the HtmlResponseWriter was modeled after the JSF response writer). However, I agree with you that these methods should no longer throw IOException.
As per 2011-04-11 the IOException is gone and the method set of the JavascriptResponseWriter is reduced to the necessary minimum.
Thanks, looks good.