tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Eric Miller" <tom...@shark.uchicago.edu>
Subject Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?
Date Tue, 21 Aug 2001 20:37:15 GMT
Cool, thanks, I appreciate it. I'll give it a try. If this works, that's
good investigative work.

Jon

----- Original Message -----
From: "Mauro Bertapelle" <mauro.bertapelle@jmatica.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, August 21, 2001 12:56 PM
Subject: Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?


> Jonathan,
>
> this was already discussed in this list some times ago..
>
> Regards,
>
> mauro
> --
>
> > Scott,
> >
> > I've finally got it.
> > The problem with Internet Explorer is that, no matter
> > how many flavors of no-cache, cache-no, no-cache-thanks, etc..
> > you put in your header, it'll not output anything until it
> > has read at least 256 characters:
> >
> > public void doPost(HttpServletRequest request, HttpServletResponse
response)
> >     throws ServletException, IOException {
> >
> >   response.setContentType("text/html");
> >   response.setIntHeader("Expires", -1);
> >   response.addHeader("Cache-Control", "no-cache");
> >   response.addHeader("pragma", "no-cache");
> >   PrintWriter out = response.getWriter();
> >   out.println("<html>");                     // 7
> >   out.println("<head><title>Title</title>"); // 34
> >   out.println("</head><body>");              // 48
> >
out.println("<!-------------------------------------------------------------
----------------"); // 128
> >
out.println("---------------------------------------------------------------
----------------"); // 208
> >   // out.println("---------------------------------> phase 1<br>"); //
255, doesn't display till end of page
> >   out.println("----------------------------------> phase 1<br>"); //
256, start display immediately
> >
> >   response.flushBuffer();
> >
> >   try {
> >     Thread.sleep(5000);
> >   } catch (Exception e) {
> >   };
> >   out.println("phase 2");
> >   out.println("</body>");
> >   out.println("</html>");
> >   out.close();
> > }
> >
> > Regards,
> >
> > Mauro Bertapelle
> > JMatica Srl
> > mauro.bertapelle@jmatica.com
> > --
>


Mime
View raw message