Legacy Knowledge Base
Published Jul. 2, 2025

Setting Up Liferay Portal 6.2 on GlassFish 4

Written By

Justin Choi

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

This article documents how to install Liferay Portal 6.2 war on Oracle Glassfish 4.

Resolution

Required Files

  1. Download the GlassFish 4 server zip file; available on the GlassFish Server Open Source Edition 4.0 download page.
  2. Download the Liferay Portal 6.2 war available through Liferay's customer portal page.
  3. Dependencies:
    • hsql.jar
    • jta.jar
    • jtds.jar
    • junit.jar
    • jutf7.jar
    • mail.jar
    • mysql.jar
    • persistence.jar
    • portal-service.jar
    • portlet.jar
    • postgresql.jar
    • script-10.jar
    • servlet-api.jar

Configuring the Domain

  1. Unzip the GlassFish 4 server zip file. GlassFish 4 home is found \..\glassfish4\glassfish. This folder will be called ${GlassFish HOME}.
  2. Navigate to ${GlassFish HOME}\domains\domain1\lib. Add all the dependencies to this folder.
  3. Modify the domain.xml to set the file encoding, time zone, protocol stack, and increase the default amount of memory available. Navigate to ${GlassFish HOME}\domains\domain1\config and open the domain.xml file. Insert the following:
    -Dfile.encoding=UTF-8
    -Djava.net.preferIPv4Stack=true
    -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
    -Duser.timezone=GMT
    -Xmx1024m
    -XX:MaxPermSize=512m
    
  4. There may be multiple lists of JVM options in the domain.xml file. For example, by default, the domain.xml contains two lists of JVM options. There is one list inside of the element’s element and another inside of the element’s element. In both lists of JVM options, replace any existing options with the new values specified above.
  5. Delete the \domain1\docroot\index.html file.

Installing Liferay Portal

  1. Start the application server.
  2. Navigate to http://localhost:4848
  3. Click Application in the left navigation tree.
  4. Click Deploy
  5. Under Packaged File to Be Uploaded to the Server, click Choose File and browse to the location of the Liferay Portal .war file.
  6. Enter "/" in the Context Root field.
  7. Enter a name in the Application Name field.
  8. Click OK
  9. Navigate to http://localhost:8080

Additional Information

See our Official Documentation Guide here: Installing Liferay on Glassfish 4

Did this article resolve your issue ?

Legacy Knowledge Base