Any documentation/example about org.apache.catalina.Comet* ?

2007-04-18 Thread Benjamin Larchevêque
Hello, I saw that Tomcat proposes some interfaces to use Comet like Servlet 
from version 6.x. Even(t) if I get the main idea I was not able to reuse the 
pseudo code servlet ChatServlet provided on the following page:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html

I would like to know if someone already used this techno successfully and could 
give me a link including a valid example or documentation on this topic. My 
main problem here is that I am never able to display anything in the web page 
while the connection is open... which is embarrassing in a Comet perspective :(

Regards,
--
  Benjamin Larchevêque
  Ingénieur Etude  Développement
  
   Team Trade Paris
   43, rue Taitbout
   75009 Paris
   +33 6 1955 6012
   [EMAIL PROTECTED]

   http://www.linkedin.com/in/larcheveque

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



The ChatServlet does not print anything.

2007-04-17 Thread Benjamin Larchevêque
Hi, I am trying to use the Comet feature in Tomcat 6. I think my APR connector 
is working since I reach successfully the event() method, but when I launch the 
ChatServlet the page remains the same for ages. Actually when I really reduce 
the code to something like:


public void event(CometEvent event) throws IOException, ServletException {
System.out.println(event.getEventType() =  + event.getEventType());
HttpServletResponse response = event.getHttpServletResponse() ;
PrintWriter writer = response.getWriter() ;
writer.println(htmlheadtitleJSP 
Chat/title/headbodytest/body/html) ;
writer.flush() ;
event.close() ;
}


In debug mode, the word 'test' is only printed in my web page when I pass the 
even.close() line... Is it normal? If it is, how can I loop to print anything 
after closing the event? More generally, how can I choose my event type such as 
READ, BEGIN, CLOSE...

If someone could tell me what I am missing here...

--
  Benjamin Larchevêque
  Ingénieur Etude  Développement
  
   Team Trade Paris
   43, rue Taitbout
   75009 Paris
   +33 6 1955 6012
   [EMAIL PROTECTED]

   http://www.linkedin.com/in/larcheveque

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