Re: DOMWriter proposed change
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
At 12:00 PM 10/2/2003 -0500, you wrote: >Here we send the response object to the writer and let the DOMWriter open >up the writer or output stream associated with the response. Since the >DOMWriter opens it, it seems like it should close it. It is also much >less klunky than.... > >new DefaultDOMWriter().write(dom, vec.getResponse()); >vec.getResponse().getWriter().close(); Upon more thought, one isn't even supposed to close the writer or output stream gotten from the response object. Rather, one is supposed to use response.flushBuffer(). That commits the response. I think the container takes care of closing streams. For that reason, I think the current usage of setLeaveWriterOpen() is appropriate and unless further information is provided to the contrary, I'd vote against this change. Jake