Friday, November 5, 2010

New Open Source : Java Web Chat Module


This project aim to develop a plug-in module for ready use in Java Web application with a little effort, it has many ways to persist the account details (XML vs DB) and it can be used as a standalone application for "Support services" in the web sites.


* Web Chat Module
* Ajax based
* Support UTF-8 (for multi-lingual)
* Standalone Service or Plugin in your web site
* Easy customizable, account management is left to implementer
* XML-based account management is the default, you can use DB instead.
* Easy icons customization and adding more themes to it.
* Performance is good and least memory consumption.
* Support emoticons
* Sound is supported in IE (only currently, can be fixed later with HTML5)
* Messages failed to deliver returned to the sender.

Project URL:

The module is easy customizable and fit into any Java web application (or non-Java) and can be used as a standalone chat gateway.

Source code in a Netbeans project can downloaded here.


  1. Can members auto login if they already log in portal or forum?
    Friends dating

  2. Yea, sure just pass credential during login to portal or forum to it, actually the login module and user management should be implemented by the portal/forum itself not by this utility.

  3. i am getting an error org.apache.jasper.JasperException: Unable to compile class for JSP:

    An error occurred at line: 6 in the generated java file
    Syntax error on token ";", delete this token
    plz contact

  4. Can you provides more details about the error ...

    It seems there is extra ";" is expression <%=.....; %> but i am not sure , i need more details...

    What are the IDE you are using ? and JDK version ?

  5. Any manual to install?

    1. install? deploy it on any app server or import source code and customize it.

  6. Can I use this code for large enterprise level project?

    1. yea you can but you would need to tweak the implementation of messaging collection into persistent database or the memory will grow up ...

    2. Can I use this code for large enterprise level project?

      Can U please tell me the procedure how to tweak the implementation of messaging collection into persistent database ?

    3. What i mean to persist the messages instead of storing them into a collection in the memory, it depends on the number of users..
      You can do the following dummy changes:
      - Create DB table same bean structure that carry the message (with any required additional tables)
      - Create JPA with a new entity bean that map to this table.
      - Use create/select all/remove to add and remove messages from the queue per user ajax call.

    4. Thank u very much sir.

    5. -Create DB table same bean structure that carry the message.
      Usage of above table--when I send message ,it need to be stored in the database and retrieved from db and display to the user?

    6. Yea you need to do that in big enterprise application with some sort of cache:
      - Keep new messages in memory collections.
      - Messages that become old , (if ajax will get the messages in every 1 second for example if message remains for 3 seconds, persist it into DB and remove it from the collection)
      - Cache DB tables so getting old messages can be easier than hitting the database ...

  7. Dear Oransa,
    Thanks a lot for providing that code openly.
    Can you please suggest me how can I implement group chat in that application?

    1. You need to follow the same concept but target id would be the group id, and the message shouldn't deleted unless received by all group users , you need to keep a mapping between group and users as well.