Java Library for instant messaging over XMPP – Smack

Today I have started work on using the Java library SMACK API to concoct a web based chat client for our support teams to chat with clients on our sites. Its pretty easy to use, and if you are running ColdFusion MX7.x then you dont even need to download the Smack API as the XMPP […]

Today I have started work on using the Java library SMACK API to concoct a web based chat client for our support teams to chat with clients on our sites. Its pretty easy to use, and if you are running ColdFusion MX7.x then you dont even need to download the Smack API as the XMPP Event Gateway uses a version of Smack already. So how about some examples then?

Lets create a connection to the Jabber Server. for this project I am using OpenFire.

now lets login with the generic user I created earlier called coldfusion:

Pretty easy huh? If you go check out the active sessions in the OpenFire administrator you will see that the user coldfusion is online. Now you can buddy this user in your IM client! I started off with using Aaron Johnson’s smack and ColdFusion example code which works great, even if it is 2 years or so old. So he is responsible for getting me started.

Duncan Isaksen-Loxton

Educated as a web developer, with over 20 years of internet based work and experience, Duncan is a Google Workspace Certified Collaboration Engineer and a WordPress expert.
Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.