powered by Jive Software

How to create a webchat


I need some help.

I have an Openfire Server and implemented a MultiUserChat with the Smack Library. With a PacketListener I’m able to print incoming messages to my console.

Now I want to see those messages in a Browser window. The goal is to have a module (jsp or html site) which displays incoming messages. Things like sending messages are not necessary in this case.

But I’m not able to print those messages to the Browser window, because they will be processed in a java function and I’m not able to force the html to display them, when the PacketListener reacts.

So how may I solve this problem. Which possibilities do I have to create such a webchat.

What about Webspark? May this be a solution? I downloaded it and saw something of flash parameters. Do I need flash for that?

I’m really new to this topic and I hope you can tell me what I need and how I have to start.

Best regards

Use Ajax to call a listener for your messages and display them into the browser.

it will be easier for you to use JSP because you can use smack in your server.

in javascript into your html page you can use as an example :

function checkMyMessages()


** // Ajax Query to checkout for messages

** setimeout(checkMyMessages,1000); // call this function every 1 second