Legacy Knowledge Base
Published Jul. 2, 2025

Configuring Liferay with Wildfly

Written By

Amit Tiwari

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.

Issue

  • Detailed steps to Install Liferay DXP on Wildfly

Environment

  • Liferay DXP 7.2+
  • JDK 1.8

Note: For the Wildfly version check for the Liferay compatibility matrix of 7.2 and 7.3

Resolution

Download the below files from the Help Center:

  1. DXP WAR file

  2. Dependencies ZIP file

  3. OSGi Dependencies ZIP file

  • Create the folder $WILDFLY_HOME/modules/com/liferay/portal/main and extract the Dependencies ZIP JARs to it.
  • Create the file module.xml in the $WILDFLY_HOME/modules/com/liferay/portal/main folder and insert this configuration:
<?xml version="1.0"?>

<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
 <resources>
<resource-root path="com.liferay.petra.concurrent.jar" />
<resource-root path="com.liferay.petra.executor.jar" />
<resource-root path="com.liferay.petra.function.jar" />
<resource-root path="com.liferay.petra.io.jar" />
<resource-root path="com.liferay.petra.lang.jar" />
<resource-root path="com.liferay.petra.memory.jar" />
<resource-root path="com.liferay.petra.nio.jar" />
<resource-root path="com.liferay.petra.process.jar" />
<resource-root path="com.liferay.petra.reflect.jar" />
<resource-root path="com.liferay.petra.string.jar" />
<resource-root path="com.liferay.registry.api.jar" />
<resource-root path="hsql.jar" />
<resource-root path="portal-kernel.jar" />
<resource-root path="portlet.jar" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.mail.api" />
<module name="javax.servlet.api" />
<module name="javax.servlet.jsp.api" />
<module name="javax.transaction.api" />
</dependencies>
</module>

For each JAR in the Liferay dependencies ZIP, add a resource-root element with its path attribute set to the JAR name. For example, add a resource-root an element like this for the com.liferay.petra.concurrent.jar file:

<resource-root path="com.liferay.petra.concurrent.jar" />
  • Create an osgi folder in your Liferay Home folder. Extract the OSGi Dependencies ZIP file that you downloaded into the [Liferay Home]/osgi folder.
  • Navigate to $WILDFLY_HOME/standalone/configuration/standalone.xml and make the following modifications:

1. In the <jsp-config> tag set the Java VM compatibility for Liferay source and class files. They are compatible with Java 8 by default.

<jsp-config development="true" source-vm="1.8" target-vm="1.8" />

2. Locate the closing </extensions> tag. Directly beneath that tag, insert the following system properties:

<system-properties>
    <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8" />
    <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true" />
</system-properties>

3. Add the following <filter-spec> tag within the <console-handler> tag which is directly below the <level name="INFO"/> tag:

<filter-spec value="not(any(match(&quot;WFLYSRV0059&quot;),match(&quot;WFLYEE0007&quot;)))" />

4. Add a timeout for the deployment scanner by setting deployment-timeout="600" as seen in the excerpt below.

<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
    <deployment-scanner deployment-timeout="600" path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>

5. Remove the welcome content code snippets:

<location name="/" handler="welcome-content"/>

and

<handlers>
    <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>

6. Navigate to $WILDFLY_HOME/bin/

standalone.conf.bat (for Windows):

Comment out the initial JAVA_OPTS assignment: 

rem set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=2560m"

Add the following JAVA_OPTS assignment one line above the :JAVA_OPTS_SET the line found at end of the file:

set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv

standalone.conf (for Unix):

1. Below the if [ "x$JAVA_OPTS" = "x" ]; the statement, replace this JAVA_OPTS statement:

JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=2560m -Djava.net.preferIPv4Stack=true"

with this:

JAVA_OPTS="-Djava.net.preferIPv4Stack=true"

2. Add the following statement to the bottom of the file:

JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.as.management.blocking.timeout=480 -Duser.timezone=GMT -Xms2560m -Xmx2560m -XX:MaxMetaspaceSize=512m"

On JDK 11, add this JVM argument to display four-digit years.

-Djava.locale.providers=JRE,COMPAT,CLDR
NOTE:

If using the IBM JDK with the JBoss server, complete these additional steps:

Navigate to the $JBOSS_HOME/modules/com/liferay/portal/main/module.xml file and insert the following dependency within the <dependencies> element:

<module name="ibm.jdk" />

7. Navigate to the $JBOSS_HOME/modules/system/layers/base/sun/jdk/main/module.xml file and insert the following path names inside the <paths>...</paths> element:

<path name="com/sun/crypto" />
<path name="com/sun/crypto/provider" />
<path name="com/sun/image/codec/jpeg" />
<path name="com/sun/org/apache/xml/internal/resolver" />
<path name="com/sun/org/apache/xml/internal/resolver/tools" />

8. If the folder $WILDFLY_HOME/standalone/deployments/ROOT.war already exists in the WildFly installation, delete all of its subfolders and files. Otherwise, create a new folder called $WILDFLY_HOME/standalone/deployments/ROOT.war.

9. Unzip the DXP .war file into the ROOT.war folder.

10. To trigger deployment of ROOT.war, create an empty file named ROOT.war.dodeploy in the $WILDFLY_HOME/standalone/deployments/ folder. On startup, WildFly detects this file and deploys it as a web application.

11. Start the WildFly application server by navigating to $WILDFLY_HOME/bin and running standalone.bat or standalone.sh

12. Place the activation key in the Liferay DXP deploy folder.

Additional Information

  1. Installing on WildFly 
  2. Download Wildfly based on supported version as per the compatibility matrix
  3. Download the Liferay DXP WAR, Dependencies zip, OSGi Dependencies of the particular version
Did this article resolve your issue ?

Legacy Knowledge Base