You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Sherwood <js...@rgisolutions.com> on 2005/04/01 14:47:59 UTC

Tomcat / Broswer interaction question

Hello,

Is there a way to have tomcat monitor a port or socket for incomming events,
then from those events, talk to a currently open broswer in javascript
events?

Thanks in advance,
James



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


[OT] Server / Broswer interaction question

Posted by QM <qm...@brandxdev.net>.
I've renamed your subject as [OT] because it's not specifically about
Tomcat.


On Fri, Apr 01, 2005 at 08:47:59AM -0400, James Sherwood wrote:
: Is there a way to have tomcat monitor a port or socket for incomming events,
: then from those events, talk to a currently open broswer in javascript
: events?

This is not directly possible, based on the stateless notion of HTTP
requests: a browser hits a site, fetches data (some resource based on the
URL and other params), and disconnects.

I say "directly" because there's usually some indirect workaround.

Your best bet is to find some way for the data to be there when the browser
makes its request.  One such way would be to have a self-refreshing iframe
(or whatever) that keeps contacting the server.  That would be quite
chatty, however, so it may or may not be suitable for your situation.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org