Issue
- This article outlined the detailed steps to deploy Liferay DXP 7.4 on JBoss EAP.
Environment
- Liferay DXP 7.4
- JBoss EAP 7.4.0
Resolution
-
JBoss_Home/Liferay_Homecontains jboss-eap-7.4 folder which is shown below image. - Download the below files from the Help Center:
- DXP WAR file
- OSGi Dependencies ZIP file
- Create an
osgifolder inJBoss_Home/Liferay_Homefolder and extract the OSGi Dependencies ZIP file that you downloaded into the[JBoss Home/Liferay Home]/osgifolder. - Unzip the DXP WAR file into:-
Create a ROOT.war folder in[$JBOSS_HOME/Liferay_Home]jboss-eap/standalone/deployments/and unzip the Dxp war file into[$JBOSS_HOME/Liferay_Home]jboss-eap/standalone/deployments/ROOT.warfolder. - Navigate to
[$JBOSS_HOME/Liferay_Home]/jboss-eap/standalone/configuration/standalone.xmland make the following modifications:-
Configure the servlet container to use Java 8 VM compatibility with JSPs. Locate the default servlet container
<servlet-container name="default">in the<subsystem xmlns="urn:jboss:domain:undertow:12.0" ...element. In the servlet container’s<jsp-config>element, setdevelopment,source-vm, andtarget-vmattributes like this: -
Locate the closing
</extensions>tag. Directly beneath that closing tag, insert the following system properties, if they don’t already exist: -
Filter out
WFLYSRV0059andWFLYEE0007messages from the log. In the<subsystem xmlns="urn:jboss:domain:logging:8.0">element’s<console-handler>tag, add the following<filter-spec>tag directly below the<level name="INFO"/>tag. -
Add a deployment scanner timeout by adding a
deployment-timeout="600"setting to the<deployment-scanner>tag in the<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">element. For example, -
Add Liferay’s JAAS security domain to the
<subsystem xmlns="urn:jboss:domain:security:2.0">’s<security-domains>element. Here is the domain code to add: -
Comment out the welcome content elements from the
<subsystem xmlns="urn:jboss:domain:undertow:12.0" ...>element. For example,and
-
-
Checkpoint:
Before continuing, verify the following properties have been set in the
standalone.xmlfile:- The new
<system-property>is added. - The new
<filter-spec>is added. - The
<deployment-timeout>is set to600. - The new
<security-domain>is created. - Welcome content is disabled.
- The new
-
Next, configure the JVM and startup scripts:
In the
$JBOSS_HOME/bin/folder, modify the standalone domain’s configuration script filestandalone.conf:- Set the file encoding to
UTF-8 - Set the user time zone to
GMT - Set the preferred protocol stack
- Increase the default amount of memory available.
Make the following edits to yourstandalone.confscript.-
Below the
if [ "x$JAVA_OPTS" = "x" ];statement, remove the JVM sizing options from theJAVA_OPTSassignment. For example, replace this -
Add this Java options setting at the end of the file:
- To trigger deployment
ROOT.war, create an empty file namedROOT.war.dodeployin the$JBOSS_HOME/standalone/deployments/folder. - Start the JBoss application server by navigating to
$JBOSS_HOME/binand runningstandalone.sh. JBoss detects theROOT.war.dodeployfile and deploys the web application matching the file prefix (i.e.,ROOT.war).jbossjboss
- Set the file encoding to
- Congratulations!
JBoss_Home/Liferay_Homelooks like the below image after the server is up.