In rev 1622976 I have removed the class and cleaned up the client code that was using it.
Jacopo On Sep 3, 2014, at 11:30 AM, Jacopo Cappellato <[email protected]> wrote: > After the cleanup I did today (where I fixed some thread safe issues and > removed some unused methods/fields) this class is very easy to read: > it is used to figure out, by checking the servlet container implementation, > if the response should be sent using a Writer or a OutputStream; it uses a > Writer for Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity and it uses an > OutputStream for all the other servlet containers. > > However accordingly to the Servlet api: > > ServletResponse.getWriter(): > Returns a PrintWriter object that can send character text to the > client. > ServletResponse.getOutputStream(): > Returns a ServletOutputStream suitable for writing binary data in > the response. > > it seems that getWriter() should always be used (for html pages) in all the > containers, not just Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity. > Are we sure that these are the only ones that require a Writer? Or it is just > because no one tried to run OFBiz in a different container? Maybe the class > was useful in the early days of OFBiz but it is no more necessary. > In my opinion we could remove this class and always set a writer as a > response. > > WDYT? > > Jacopo >
