I posted about this a bit earlier, and I was told WebSockets were a better
approach, but I am wondering is what I am trying to do even possible? My
idea is to create a program that allows two users to connect through the
server, and send images and text to each other. for the server, i have two
servlets, one that uses comet, and one that does not. the regular servlet
listens for requests, and broadcasts them to all the available connections.
the comet servlet listens for connections, and once a connection is made,
stores the response in a singleton that both the regular servlet and comet
servlet have access to. the way its supposed to work is that the comet
servlet stores the response to all connected, the regular servlet listens
for messages, and once it receives one, gets a reference to the singleton,
goes through all its responses, and sends the message to each connection. i
can get my client to connect to the comet servlet just fine, via the tomcat
logs, but i cant get it to connect at all to the regular servlet and i dont
know why. when i print out the url used to connect to the regular servlet
and use the browser, i am not getting any server errors, so it looks like
it connects just fine, but none of my print statements in the inputservlet
ever get executed, meaning it never processes. now i am wondering, is this
idea even possible with the technology available in comet?

Reply via email to