You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by john x <lo...@gmail.com> on 2007/08/01 08:03:50 UTC

Re: COMET - Delays in output

Can you run the  comet code-example "chat" success?
I tried many times ,it don't work in tomcat6.0.13
I just try straight the url
http://localhost:8080/examples/jsp/chat/login.jsp
and also modify the server.xml ,change the protocol by "
org.apache.coyote.http11.Http11NioProtocol"
Are there other worksI did not do ?

And I also debug it, it seems there is something wrong when
execute the line
            "response.sendRedirect("post.jsp");"
the page *login.jsp* just stop util the comet session time out,then the page
rediect to *post.jsp*
**
everybody help me ,thanks
regards.
john
2007/7/27, FelixG <wr...@googlemail.com>:
>
>
> Hi,
> I'm trying to implement the comet code-example from the Tomcat
> documentation,
> using Tomcat 6.0.13, Http11NioProtocol is working and my servlet is
> implementing CometProcessor.
> I am trying to write into the response's PrintWriter with this code in
> event():
>
> if (event.getEventType() == CometEvent.EventType.BEGIN) {
> PrintWriter writer = response.getWriter();
> writer.println("<!doctype html public \"-//w3c//dtd html 4.0
> transitional//en\">");
> writer.println("<head><title>Chat Servlet</title></head>" +
> "<body bgcolor=\"#FFFFFF\">" + new Date()+ "");
> writer.flush();
> }
> ...
>
> At this point I am experiencing a delay according to the value of the
> comet.timeout parameter
> before the data is actually arriving at the client (even though flush()
> should send it immediately).
> Could someone please point me to an explanation of this behavior?
>
> Regards,
> felix
> --
> View this message in context:
> http://www.nabble.com/COMET---Delays-in-output-tf4158481.html#a11831204
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>