Receives string messages on doPost method-Once received, this message should be broadcast to all other clients.
I did this by having the client periodically refresh itself(meta http-equviv=refresh) and receive the new messages.. Is there a better way?? One in which the client could issue something like a blocking GET request
. Iv tried this with sockets but have no clue to go abt it using http.. tanx
Pleas give me more information abt this...
if you want use servlet for this purpose the client should all ways send http request only and in your client implementation may be browser or any other app.
if you are writing any Socket Programe then Http Client will not work(Browser) then allways it should be the Clent App.(Socket Client)
and an other good Option is if you want this in browser in Flex/Flash can this purpose with Socket Server.
On client side I wanted to use an applet that speaks http to the server via HttpURLConnection class. On the server side, i wanted to use a servlet... The client(applet) first logs in with a user name.
Once logged in, the client should be able to send a msg to server(via post method ). It also has a text area to receive text messages sent to the server from other clients. This is where I have a problem-
How does the client know when to ask server if any new messages have been received. The client could poll the server, but I wanted a more asynchronous method where the server could alert clients that a new message has been received...
yes..this is what i want.
if it is http request for every request there is response means until you send request you dont get any response.
1)one thing all ways you need to poll the server for getting the incoming messages..
2)second thing (good one) possible with Flash/Flex i think second is very good option.(****Servlet will not work in this role******)
this is the problem we had in lost 10 months in one our project called [u]http://www.cherple.com/widget.asp see this onces. this is two way chat application pc-cellphone when the mobile
user replays any message then Automatically it will come to the Client Side Flash widget (it will run in the browser).[/b]
i think i told the correct answer.