Hi,
  Never do a
response.getWriter().close();
  A good design would not ask you to close something that you did not
open, and this is one of those cases.
  The full response is sent when your page "releases the thread" that
is working on this request. This is, if you want to do some processing
and you want to send the response to the browser at the same time, you
have to create a new thread.

Regards,
 -lg


On Nov 9, 2007 12:09 PM, renen <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I want to tell the browser / Tomcat that I'm done processing my JSP page
> (ie, the little spinning icon in Firefox should stop spinning!).
>
> However, I still want to log a couple of things (duration, browser info
> etc). But, the users' browser doesn't need to be tied up while this happens.
>
> One way to do that would seem to be to call response.flush(). However,
> Tomcat seems to have issues with this (google: response.flush tomcat).
> Indeed, it doesn't seem to do anything at all.
>
> The one way I did manage to communicate that I was done was to call:
>
> response.getWriter().flush();
> response.getWriter().close();
>
> But, on certain (tiny) pages, it seems to kill all the content. Which is a
> bit unfortunate!
>
> Is there a way that I can signal to Tomcat / the browser / the servlet
> filters, that my JSP page is done?
>
>
> The page that doesn't render when those two lines of code are included is as
> follows:
>
> <%@ page language="java" import="za.co.oneTwoOne.web.*"
> pageEncoding="ISO-8859-1"%>
> <%
> Session myPage = new Session(request, response);
> pageContext.setAttribute("myPage", myPage);
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
>   <body>
>     ProcessID <%=myPage.getParameter("ProcessID") %> took
> <%=myPage.getInt("exec ProcessGetExecutionTime ?", "ProcessID*") %> ms to
> serve.
>   </body>
> </html>
>
> <%
> myPage.terminate();
> %>
>
>
> I really appreciate your input!
>
> Renen.
>
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to