jyhiroko
asked on
JSP Instant Messenging
Can anybody suggest a way to implement a service where a user post a text message and it appears instantly(not instanly but real time) on the admin( or simply just another user)'s screen automatically. like a chat sesson just that the receiving end user will not be replying. If possible try to be as detail as possible in offering ideas or solutions for I am new to jsp.. (nv done anything in it b4) thanks:> ^_- cheers. Do offer links to tutorials or source code of related topics.
PS: Both receiving n sending users are connectin thru a web broswer. Sort of like a moderator at home receiving comments real time..
PS: Both receiving n sending users are connectin thru a web broswer. Sort of like a moderator at home receiving comments real time..
ASKER
Method seems clear but i got no idea how to implement this.. let me try to digest it for a while. Any source to refer to?
ASKER
Will the message auto pop up on the receiving end automatically upon submition by the sender?
> Will the message auto pop up on the receiving end automatically upon submition by the sender?
No, you will either need:
a) A frame which is constantly refreshing, and shows a popup if a new message has been recieved
or
b) Only check when the page is loaded, and show a popup then...
No, you will either need:
a) A frame which is constantly refreshing, and shows a popup if a new message has been recieved
or
b) Only check when the page is loaded, and show a popup then...
ASKER
The problem is i got a solution for this.. but i need it to be real time. instead of contanst refreshing. Any alternative solutions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you really need real real-time :) I am afraid you need to write an applet.... - Which does not have a lot to do with jsp.
ASKER
how to do it using applet?
ASKER
how to do it using applet?
Then you could store an ArrayList of messages inside the session object, and the user could be shown the last n messages that they recieved...
Of course, this is a transient solution, as if the user has simply closed their browser, then they will never recieve the messages
So you will need to store the messages in some permanent format (file or db), and then when the user logs on, or visits a page, check for new messages in the db and return them to the user...
Tim.