Before you begin developing the Guestbook app for Android, you must set up the Guestbook portlet in a Liferay Portal instance. To do this, follow these steps:
- Install JDK 8
- Install and Configure a Local Liferay Portal Bundle
- Deploy the Guestbook Portlet to the Local Liferay Portal Instance
To get started, you must have JDK 8 installed. You can download and install the Java SE JDK from the Java downloads page. This page also has links to the JDK installation instructions.
First, download a Liferay Portal 6.2 Tomcat bundle from
and follow the instructions to install the bundle. To follow best practices, you
should create a
bundles folder and unzip it there. The bundle’s root
folder is referred to as Liferay Home and is named according to the
version, edition, and specific Liferay Portal release. For example, if you
downloaded Liferay Portal 6.2 CE GA6 and unzipped it to a
bundles folder on
your machine, that bundle’s Liferay Home folder path is:
Now you’re ready to start Liferay Portal! Start the bundle as described in the
link above. If you’re on Mac or Linux you should also run
tail -f ../logs/catalina.out immediately after the
executes. This ensures that the server log prints to the terminal. This step
isn’t necessary on Windows because the server log automatically opens in another
After a minute or two, Liferay Portal starts up and automatically takes you to its initial setup page at http://localhost:8080. On this page, you need to provide some basic information about how to set up your Liferay Portal instance. Enter a name for your instance, select the default language, and then uncheck the Add Sample Data box. Then enter the first name, last name, and email address of the default administrative user. For the purposes of this Learning Path, these don’t have to be real. If you want to connect Liferay Portal to a separate database such as MySQL or PostgreSQL, you can configure that connection here. Note that although the default embedded database is fine for development on your local machine, it isn’t optimized for production. Click Finish Configuration when you’re done. When the success message appears, click Go to My Portal. Then set a password and a password reminder query for your administrative user. Your Liferay Portal instance then takes you to its default site.
Great! Next, you’ll deploy the Guestbook portlet to your Liferay Portal instance.
Now that your portal is set up, you can deploy the Guestbook portlet to it.
Download the Guestbook portlet’s
.war package from
and place it in the
[Liferay Home]/deploy folder. You should see messages
in your console indicating that the Guestbook portlet has been successfully
deployed. On your portal’s default site, click the + icon on the left side of
the screen and then click Applications at the top of the menu that slides out.
Open the Sample category and drag Guestbook onto the page. The Guestbook
portlet should now appear with the default Main guestbook. Add a new guestbook
in the portlet and an entry or two to each. When you create the Guestbook
Android app, this ensures there’s some content to display in it. The Guestbook
portlet on your site should now look like this:
Stupendous! You’ve successfully set up a Liferay Portal installation and added the Guestbook portlet to it. Now you’re ready to get started with the Liferay Mobile SDK.