send data by servlet to their clients

hi

i am developing a chat base system using applet ,jsp and servlet in tomcat server. it is purely web based, means no firewall restrictions using http get & post methods. how can i send message using servlet to their respected client, where the client program will not do any thing. means i want to send masseages to client by the server prob. and the clients get their messages and update it in their message window. so please tell how will i implement this. if any example code any have please give me

thanks

[535 byte] By [parthi_ra] at [2007-10-2 0:52:01]
# 1

As far as I know, it can not be done... A browser only accepts responses for the requests it sends! So, if the browser does not send a request, it'll ignore incoming responses!

The only way I think you can do it, is to somehow force the clients browser to make a request (refresh) - But as you know, a request should not be sent when user is in the middle of typing a message.

One idea would be to split your page up into 2 frames - one for the text and another for input... You can make the text frame auto-refresh and the requests from the input to be sent to the text frame ... that might work!

Good luck with it.

munyula at 2007-7-15 18:11:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...