I am trying to use smack in a web based chat application, using servlets and am running into a few issues.
The problem I face is that, after I log into the server and send a message from one user using chat.sendMessage(“text”), I am not able to retrieve that message from the server using chat.pollMessage() of the other user. Having a listener for every connection is not an efficient or an ideal solution for me.
Could someone please let me know how else can I retrieve messages?
Any help would be appreciated.
Thanks in advance,