Setting up the Guestbook Portlet

Before you begin developing the Guestbook app for iOS, you must set up the Guestbook portlet in a Liferay DXP instance. To do this, follow these steps:

  1. Install JDK 8
  2. Install and Configure a Local Liferay DXP Bundle
  3. Deploy the Guestbook Portlet to the Local Liferay DXP Instance

Installing the JDK

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.

Installing and Configuring a Local Liferay DXP Bundle

Follow these instructions to install and configure a local Liferay DXP instance:

  1. Download a Liferay DXP Tomcat bundle from

  2. Unzip the bundle to a new bundles folder. Note that the bundle’s root folder is referred to as Liferay Home and is named according to the version, edition, and specific Liferay DXP release. For example, if you downloaded Liferay CE Portal 7.0 GA5 and unzipped it to a bundles folder on your machine, that bundle’s Liferay Home folder is:

  3. Now you’re ready to start Liferay DXP! Open a terminal and navigate to [Liferay Home]/tomcat-[version]/bin. Then run these commands:

    tail -f ../logs/catalina.out

    The tail command ensures that the server log prints to the terminal.

  4. After a minute or two, Liferay DXP starts up and automatically takes you to its initial setup page at http://localhost:8080. On this page, provide the following information to set up your Liferay DXP instance:

    • Enter a name for your instance.
    • Select the default language.
    • Uncheck the Add Sample Data box.
    • 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 DXP 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.

  5. Accept the terms of use.

  6. Set a password and a password reminder query for your administrative user. Your Liferay DXP instance then takes you to its default site.

Great! Next, you’ll deploy the Guestbook portlet to your Liferay DXP instance.

Deploying the Guestbook Portlet

Now that your portal is set up, you can deploy the Guestbook portlet to it. Follow these instructions to do so:

  1. Download the Guestbook portlet’s modules:

  2. Place these modules in your Liferay DXP instance’s [Liferay Home]/deploy folder. You should then see console messages indicating that the modules have successfully deployed and started.

  3. On your Liferay DXP instance’s default site, click the Add button (Add) on the upper-right corner of the screen. Then click the ApplicationsSample category and drag Guestbook onto the page. The Guestbook portlet should now appear with the default guestbook (Main).

  4. In the portlet, add a new guestbook and an entry or two each from the Add menu (Add) that appears in the top right of the portlet’s border when you mouse over the portlet. When you create the Guestbook iOS app, this ensures there’s some content to display in it. The Guestbook portlet on your site should now look like this:

    Figure 1: The Guestbook portlet, with a new guestbook and some entries.

    Figure 1: The Guestbook portlet, with a new guestbook and some entries.

Stupendous! You’ve successfully set up a Liferay DXP instance and added the Guestbook portlet to it. Now you’re ready to get started with the Liferay Mobile SDK.

« Beginning iOS Development for Your PortalBuilding the Guestbook Mobile SDK »