> "Steve McCarthy" <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > >> Steve, > >> > >> In 8916 - if you use: > >> > >> service() { > >> w= new PrintWriter( response.getOutputStream ); > >> w.println(...) > >> } > >> > >> If you don't flush, then you'll get no output. > >> > >> That's not because of the servlet spec - but because of the way > >> PrintWriter works, it'll put your output in a buffer and that'll not be > >> written to the output stream. > >> > > Please note that the example uses a PrintWriter, and not a > > BufferedWriter. Looking at the source of PrintWriter, all of the > > println() methods write the data to the underlying OutputStream - > > characters are not buffered Writer level. If there is any buffering, it > > occurs in the OutputStream provided by the container, and is therefore > > available to the container. > > > > It isn't any different than obtaining the OutputStream from the > > container, writing bytes to it, and then not calling flush on the > > OutputStream: > > > > service(...) { > > OutputStream os = response.getOutputStream(); > > byte arr[] = ".......".getBytes(); > > os.write(arr); > > // no os.flush(); > > } > > Hmm... That actually (I tried it) works on 4.0.3 with the HTTP connector (I > have my doubts about Coyote, it simply crashes with an NPE)... Look:
? Which version of Coyote HTTP/1.1 are you using, and what is the error ? Tomcat 4.1.0 / 4.1.1 works fine for me. Remy -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>