Filip: I set up the server.xml with the connector and web.xml as you have indicated, but I am unable to get any comet response. I am using tomcat 6.0.16, and it does not seem to recognize the tomcatAuthentication or keepAliveTimeout attributes, and it complains about listeners.ContextListener and listener.SessionListener having already been configured for this context.I do not know if these are relevant here.
I have it set up in <catalina_home>/webapps/comet, with classes and web.xml under <catalina_home>/webapps/comet/WEB-INF directory. Yes, the class file is in the correct directory, <catalina_home>/webapps/comet/WEB-INF/classes/testing/comet. The tomcat manager tells me the comet servlet is running, and if I put <load-on-startup>1</load-on-startup> in web.xml I get the 'Comet test servlet initialized.' and "Comet test initialized." lines. But no comet response just from hitting http://localhost:3809/comet. Yes, I am using port 3809, and have the connector set up that way with Http11NioProtocol. Any thoughts why this is not working? Thanks Filip Hanik - Dev Lists wrote: > > I took your servlet, compiled it, put it in WEB-INF/classes/testing/comet > > then in web.xml I put > <servlet> > <servlet-name>testcomet</servlet-name> > <servlet-class>testing.comet.CometConnection</servlet-class> > </servlet> > > <servlet-mapping> > <servlet-name>testcomet</servlet-name> > <url-pattern>/comet</url-pattern> > </servlet-mapping> > > server.xml has > <Connector port="8080" > protocol="org.apache.coyote.http11.Http11NioProtocol" > connectionTimeout="10000" > tomcatAuthentication="false" keepaliveTimeout="5000" > backlog="50" maxThreads="300" /> > > > hit http://localhost:8080/comet with my browser, output is > > Comet test servlet initialized. > Comet test initialized. > Received event BEGIN > > > Filip > Talal Rabaa wrote: >> package testing.comet; >> >> import java.io.IOException; >> >> import javax.servlet.ServletException; >> import javax.servlet.http.HttpServlet; >> import javax.servlet.http.HttpServletRequest; >> import javax.servlet.http.HttpServletResponse; >> >> import org.apache.catalina.CometEvent; >> import org.apache.catalina.CometProcessor; >> >> public class CometConnection extends HttpServlet implements >> CometProcessor >> { >> public CometConnection() >> { >> System.err.println("Comet test servlet initialized."); >> } >> >> public void init() >> { >> System.err.println("Comet test initialized."); >> } >> >> public void doGet(HttpServletRequest request, HttpServletResponse >> response) throws IOException >> { >> System.err.println("doGet called."); >> } >> >> public void doPost(HttpServletRequest request, HttpServletResponse >> response) throws IOException >> { >> System.err.println("doPost called."); >> } >> >> public void event(CometEvent cometEvent) throws IOException, >> ServletException >> { >> System.err.println("Received event " + >> cometEvent.getEventType().toString()); >> } >> >> protected void service(HttpServletRequest request, HttpServletResponse >> response) throws ServletException, IOException >> { >> >> response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "You >> must be using the APR or NIO connector to get the event method called."); >> } >> } >> >> -----Original Message----- >> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, July 30, 2008 1:28 PM >> To: Tomcat Users List >> Subject: Re: Setting up Comet on Tomcat 6 >> >> send us your test class >> >> >> --------------------------------------------------------------------- >> 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] > > > -- View this message in context: http://www.nabble.com/Setting-up-Comet-on-Tomcat-6-tp18711436p19208047.html 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]