Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340927 - Cleanup and refactor HtmlResponseWriter
Summary: Cleanup and refactor HtmlResponseWriter
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 311355
  Show dependency tree
 
Reported: 2011-03-24 21:34 EDT by Ralf Sternberg CLA
Modified: 2011-04-11 09:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2011-03-24 21:34:59 EDT
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).
Comment 1 Ralf Sternberg CLA 2011-03-30 18:30:24 EDT
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.
Comment 2 Stephan Leicht Vogt CLA 2011-04-06 03:09:55 EDT
Why do the write-methods throw an IOException? None of the called methods in those write-methods do throw an IOException?
Comment 3 Rüdiger Herrmann CLA 2011-04-06 04:55:07 EDT
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.
Comment 4 Rüdiger Herrmann CLA 2011-04-11 07:12:00 EDT
As per 2011-04-11 the IOException is gone and the method set of the JavascriptResponseWriter is reduced to the necessary minimum.
Comment 5 Stephan Leicht Vogt CLA 2011-04-11 09:13:39 EDT
Thanks, looks good.