I might have found the answer to this. Some application servers perform better with an output stream instead of a print writer (or the other way around). If that is the reason for this code, shouldn't that be something that is configurable? Right now the choices are hard-coded in Java. Why not allow OFBiz users choose the settings most appropriate for their installation?
-Adrian --- On Sat, 6/5/10, Adrian Crum <adrian.c...@yahoo.com> wrote: > From: Adrian Crum <adrian.c...@yahoo.com> > Subject: Question About UtilJ2eeCompat.java > To: dev@ofbiz.apache.org > Date: Saturday, June 5, 2010, 12:11 PM > I noticed that the screen renderers > call the UtilJ2eeCompat.useOutputStreamNotWriter method to > determine whether to use the response's print writer or > output stream. Why is that check necessary? From my > understanding of the javax.servlet spec, you use a writer to > send text and you use the output stream to send binary > data. > > -Adrian > > > > >