Beginner Question

Hi all. I have a site where user logs on (using Java Servlet). I want to give them the ability to be able to see each other(using sessions) and send an instant message. Can I do this with jabber? If I can what do I need? A jabber server? Do the users need to have jabber clients?

I will really appreciate your answers.

Nick Tsioutsias.

Hi Nick,

Yup, Jabber would work very well for what you’'re trying to accomplish.

A real good place to start would be to pickup a copy of “Instant Messaging in Java The Jabber Protocols” ( http://www.manning.com/shigeoka/index.html ). The book contains a somewhat limited, but fully functional Java based Jabber server, a simple client and serves as a very good introduction to Jabber as a whole.

For more robust Jabber servers, there are a number of implementations both free and commercial, to chose from, look here to begin with: http://www.jabber.org/admin/serverlist.php

To develop a more robust client, take a look at the Smack API. Even though it is still in beta, the Smack API is a good place to begin since it is a very easy to understand and use.

Other good recourses are:

http://www.jabberstudio.org

http://www.jabber.org (particularly the developer conference room)

Good luck,

Ryan

Sorry to bother you but I need to be sure before I start reading and trying to make the code work. I need to be sure I can do the following things.

  1. Can i register a user automatically?

  2. Can i run a free server on Win 2000? I think that only commercials servers exist.

  3. Users need to have download a jabber client?

I hope I will get an answer. Thanks for your time.

Nick.

  1. automatic registration requires little work:

at first user can try to login, if there are no such account yet on server (server will return XMPP error 402) you can automatically create account (by default server requires only login and password)

  1. there is JabberD server for Win32 - im using it for testing

  2. it belongs from what are going to create(develop) - if users will use jabber thru your apllication they dont need another jabber client, if not - they need to download jabber client

  1. Users need to have download a jabber client?

You could develop an applet or flash based client so your users wouldn’'t have to download a client, at least not in the traditional sense of the word. There is always Java WebStart as well.

I want to ask you about the jabberd server. Fisrt, when I try to change sth in the jabber.xml and re-run jabberd I always get an error message about jabber.xml (unable to parse). Even when i change a word of the new user message. I do not thing this is my fault. Anyone had the same problem? If I do not change .xml file I do not thing I can connect to the jabberd using my ip address (I can only connect using localhost as server).

Thanks for all your answers. Hope you can answer this one as well.

Nick

This reply is a bit belated I know… but I think I had the same problem. It had to do with XMLSpy changing the orientation of tags about when saving. I you read the jabber.xml file, there are some lines that have to stay as-is in terms of how the tags are aligned.

<jabberd:cmdline flag=“h”>localhost</jabberd:cmdline>

So, if you change that line to

<jabberd:cmdline flag=“h”>localhost</jabberd:cmdline>

initialisation will fail.

I recommend using a text editor on that one, and be careful. Seems strange to me, but oh well…