I have made a general chat application using JSP & Servlets. Now i am making an additional one-to-one chat module in my application.
So if you could please give me a suggestion about this one-to-one chat module ie ,how to make it possible that when i send one message which should be personaly viewed by intended user, it gets displayed on the intended users window .
Temporary i have written the servlet code for sending the message by the user who wants it to be received by the intended user using a simple textfield & send button & i am successful in sending the message ie on the JSP side I'm getting the message printed with the sender's name.
Now how to approach for making the intended user receive the message personally on his own window/page if he is chatting with me(for e.g).
My whole user interface has been made using HTML & JSP code inside it.
Thanking you, Jignesh
The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
On the server you need to keep track of who the message is for. Then when a certain id checks to see whether there are messages, you can check the
But sir i don't know --on the server side how to keep track of who the message is for??? So if you could help me make understand through a small snippet of sample code ,I would be very much grateful to you.
Hi, If a user sends a message you encode sender info along with the message.Parse the message to idetify who sends the message. You can also encode reciipient in the message if it is a private or one-to-one message.
subject: A query regarding the one-to-one chat module