« Back to Portlets

Chat Portlet

Tags: liferay v4.3

This is a legacy article. As of Liferay 5.1, Chat Portlet has been integrated into Liferay as the Chat plugin.

Introduction #

This guide will help you setup Chat Portlet on Liferay 4.2. As of 5.1, this portlet has been removed and replaced by a new plugin Chat portlet.


Whether you are working on your extension environment or a simple installation of the liferay-portal-tomcat-jdk1.5-4.2.0 bundle, there are a few basic steps to setting up the Chat portlet.

1) Setup/run OpenFire Chat server.

2) Edit portal-ext.properties.

3) Turn off Firewall or open TCP ports 9090 and 9091


  • Openfire (formerly Wildfire) Open Source software - (the chat server that Chat Portlet talks to)
  • Openfire Admin Account
  • Liferay 4.2 or higher



  • Openfire is just the new name of Wildfire. As it is the same software, just substitute the Wildfire expressions below with Openfire.

1. Download Openfire (originally Wildfire) Open Source software from http://www.igniterealtime.org/downloads/index.jsp

  • We recommend getting the .zip. However, if you DO NOT have JAVA JRE on your machine, you must get the .exe download.

2. Unzip Openfire anywhere on your system

3. Open \wildfire\bin\wildfire.exe

3b. If you install Openfire on a Linux system, download the RPM-package and install it. It installs to /opt/openfire.

4. Wait for Wildfire to startup.

4b. On a Linux system: Start Openfire manually by executing the /opt/openfire/bin/openfire.sh. By default, the URL Openfire starts at is http://localhost:9090

5. Click on Launch Admin. You will be directed to a setup page. Select English and hit Continue.

6. Enter your Domain. Wildfire will use the domain name to set your server name. In this case, I'm just setting up Chat for my localhost. Leave Ports as the default. Hit continue.

7. Choose your Database Settings. In our case I'm using mySQL, so I'll choose Embedded Database. Hit continue.

8. Choose your Profile Settings. I'm going to use Default in this example. Hit continue.

9. Setup your Admin Email Address and Passwords. Since this is a new installation, I need to enter "admin" into Current Password. Hit Continue.

10. Next you'll see a Setup Complete screen. Hit the Login to the admin console.

11. Once you login, you'll see Server Settings. Check over the settings. If you need to edit any of them, hit the Edit Properties button at the bottom.

You have successfully installed and configured Wildfire. Now on to Liferay configuration!


  1. Open portal-ext.properties
  2. Add these statements:

Save. Run ant clean deploy in ext/ext-ejb to commit your changes to Tomcat.

Additional Properties#

There are additional properties that can be configured for the chat portlet, such as putting Wildfire on a separate server. These are optional if you install using the default settings. The following is the complete set of properties related to the setup:

 ## Jabber

Full example configuration #

The following configuration is an example taken from a real installation (IP address and password changed):


Special Notes#

  • You must turn off Windows Firewall in order for Chat Portlet to run properly.
  • You must have the Wildfire server client running.

just go to training/liferay/tomcat/webapps/root/html/js/liferayand open messaging.jsin that file go to line no 216 and instead of

    if (inputList[i].className) 
      if (inputList[i].className.match("msg-to-input-id")) toInput = inputList[i];
      if (inputList[i].className.match("msg-to-input-addr")) toAddr = inputList[i];
      if (inputList[i].className.match("msg-type-area")) typeArea = inputList[i];

just change it to

    if (inputList[i].className) 
         if (inputList[i].className.match("to-input-id")) toInput = inputList[i];
         if (inputList[i].className.match("type-area")) typeArea = inputList[i];

And One more change :


var divList = chatBox.getElementsByTagName("div");
			for (var i = 0; i < divList.length ; i++) {
				if (divList[i].className && divList[i].className.match("msg-chat-area")) chatArea = divList[i];


var divList = chatBox.getElementsByTagName("div");
for (var i = 0; i < divList.length ; i++) 
    if (divList[i].className && divList[i].className.match("chat-area")) chatArea = divList[i];
0 Attachments
Average (1 Vote)
The average rating is 1.0 stars out of 5.
Threaded Replies Author Date
@see http://issues.liferay.com/browse/LPS-19053... az eol September 14, 2011 8:33 AM

@see http://issues.liferay.com/browse/LPS-19053
@see http://issues.liferay.com/browse/LPS-13507
Posted on 9/14/11 8:33 AM.