JSP is not so good for this because it creates the page and waits for the user to act, rather than updating itself. You can see how this might work on http://www.half-empty.org where they have a sort of chat-room based on jsp. That page is based on Open Sourced code anyways, so you can take a look at the source code for it yourself as long as you are prepared to GPL anything you produce afterwards. However, I would recommend writing your own client-server system.
There are loads of chatroom examples available online and to be honest you are best looking some of them out using Google.
Hi,
I have to agree about jsp's and Chat Rooms they do have there limits but you do not have to wait for user intervention. I have a site with two demos on, it's not a completed site but you are free to look at it and if you wish for some more info post a message on the message board.
SITE: www.phenoracle.co.uk
Good Luck
Phenoracle