ServiceNow connector deployment guide

Difference Between the Liferay 6.2 and Liferay 7/DXP

  1. Basic Difference Between the Liferay 6.2 and Liferay 7/DXP



Liferay 6.2

Liferay 7/DXP


Modularity Development

Liferay 6.2 partially support and it’s an experiment and it need more effort to achieve the modularity.

Liferay 7 support modularity development using OSGi framework.


Bootstrap Version

Support Bootstrap 2 UI framework.

Liferay 7 support Bootstrap 3 UI framework.


AUI Version

AUI 2.x components are used.

AUI 3.x components are used.


Application Development

Liferay Application Development based on Plugins.

Liferay Application Development based on OSGi bundles.


Enterprises Editions name

We simply call Liferay 6.2 EE or CE

Liferay 7 EE called Liferay DXP


Application Packaged method

Liferay Applications packaged as war files and deployed in traditional application server.

Liferay Applications packaged as OSGi bundle jar files and deployed in OSGi container. It support WAR deployment as well.



Liferay 6.2 core portal and its default portlets all available in ROOT directory and deployed in Application Server.

Liferay 7 separate core portal and its default portlets. Core portal only have core features rest of features made it as portlets and packaged as bundles. Core portal files in ROOT directory deployed in Application Server. All portlet bundles available in data/OSGI directory. It means bundles deployed in OSGi container.


Search Engine

Liferay 6.2 in built search engine is Apache Lucene. Liferay 6.2 have SOLR web to enable SOLR search.

Liferay 7 inbuilt search engine Elastic Search. It support SOLR search as well.


Single Page Application

Liferay 6.2 does not have inbuilt Single Page Application support but we can integrate SPA framework to achieve it.

Liferay 7 have Single Page Application inbuilt support using Senna.js


Build tools Support

Liferay 6.2 support MAVEN, ANT.

Liferay 7 support MAVEN, GRADLE build tools.


Application development tools.

Liferay 6.2 have Plugins SDK Command Line Interface to create portlet, hook, theme and layout.

Liferay 7 introduce new tool called BLADE CLI to develop Liferay 7 Application as bundles. Internally its uses the Build tools GRADLE flavor.


Activate/Deactivate Application

Liferay 6.2 it is not possible. We should un-deploy the plugins from the server so that we can remove the unused features.

We can activate/deactivate Liferay Application Bundles simply using Apache Gogo shell Command Line Interface without un-deploy the bundle from the container.


Languages For UI

Liferay 6.2 does not have design languages like Clay and Lexicon. But it supports all necessary UI Languages like HTML, CSS, Bootstrap, JQuery, Alloy-UI etc

Liferay 7 have introduced Clay and Lexicon language to design UI. Lexicon is a design language that provides a common framework for building interfaces. Clay is web implementation of Lexicon.It’s built with HTML, CSS, and Javascript with Bootstrap as a foundation



Not So flexible environment, we need to perform code changes for any single change. like We cannot deactivate default portlets without change in the code.

Provide more flexible environment like We can easily deactivate default portlets if we are not using. We simply deactivate portlet bundle.




ServiceNow connector deployment guide

Liferay Service Builder – Connect to External/Seperate Database

  • Create a  Liferay plugin project
  • Create a service.xml , ex like below.

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE service-builder PUBLIC “-//Liferay//DTD Service Builder 6.2.0//EN” “”>
<service-builder package-path=”com.dinacs” auto-namespace-tables=”false”>
<entity name=”Feedback” local-service=”true” remote-service=”true”>

<column name=”feedbackId” type=”long” primary=”true” />

<column name=”feedbackTitle” type=”String” />
<column name=”feedbackText” type=”String” />

  • Build the service
  • Add your separate database details in ex like below.

# liferay default db

# seperate database

  • Create ext-spring.xml file under docroot/WEB-INF/src/META-INF
  • Place the content like below in ext-spring.xml

<?xml version=”1.0″?>

<beans xmlns=””
xmlns:aop=”” xmlns:context=””
xmlns:tx=”” xmlns:xsi=””

<bean id=”basePersistence” abstract=”true”>
<property name=”dataSource” ref=”dinacsDS” />
<property name=”sessionFactory” ref=”dinacsSessionFactory” />

<bean id=”dinacsHibernateSessionFactory”
<property name=”dataSource” ref=”dinacsDS” />

<bean id=”dinacsSessionFactory” class=”com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl”
<property name=”sessionFactoryImplementor” ref=”dinacsHibernateSessionFactory” />

<bean id=”dinacsDS”
<property name=”targetDataSource”>
<bean class=”com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean”>
<property name=”propertyPrefix” value=”jdbc.dinacs.” />

  • Edit the service.xml and add data-source , session-factory and tx-manager attributes to the entity tag.
  • Ex like below.

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE service-builder PUBLIC “-//Liferay//DTD Service Builder 6.2.0//EN” “”>
<service-builder package-path=”com.dinacs” auto-namespace-tables=”false”>
<entity name=”Feedback” local-service=”true” remote-service=”true” data-source=”dinacsDS” session-factory=”dinacsSessionFactory” tx-manager=”dinacsTransactionManager” >

<column name=”feedbackId” type=”long” primary=”true” />

<column name=”feedbackTitle” type=”String” />
<column name=”feedbackText” type=”String” />

  • Build the service again.
  • Deploy the portlet.

Note : tables will be created in the liferay default database only , need to manually create the tables in separate database.

ServiceNow connector deployment guide

Integrating Solr Search Engine with Liferay portal

Step 1: Setting up Solr server

1.1 download solr 4.3.1 from
1.2 Unzip it and navigate to solr-4.3.1\example and double click on start.jar
1.3 browse localhost:8983 and verify solr is up and running

Step 2: Install Solr 4 search Engine plugin on Liferay  Portal

2.1 Copy solr plugin war file to deploy folder (liferay.home/deploy)

Step 3 : Integrating Liferay Portal With Solr

Change the solr url as follows in solr-spring.xml which is located in liferay.home/tomcat/webapps/solr-web/WEB-INF/classes/META-INF/
Set the value of constructor-arg from

<bean id=”solrServer”
<constructor-arg type=”java.lang.String” value=”” />
to this :
<bean id=”solrServer”
<constructor-arg type=”java.lang.String” value=” http://${}:${solr.port.number}/solr” /> </bean>

Step 4: Restart Liferay and solr servers.

ServiceNow connector deployment guide

Integrating OKTA SSO With Liferay Portal Using SAML

1 : Installing SAML Plugin on Liferay Portal.

1.1 Download and Copy saml plugin war file to deploy folder (liferay.home/deploy)

If you do not have saml plugin war file.

1.1 Login to the Liferay portal as admin and go to the control panel
1.2 Click on apps and then purchased tab.
1.3 In purchased tab click on EE.
1.4 Search for SAML 2.0 and click on install.

2 : Creating Chicklet in OKTA For Liferay , We can create developer okta account for this trial.

2.1 Get the service provider url (liferay sp) . ex http://your domain or ip /c/portal/saml/acs
2.2  Create Okta Chicklet with following details
service provider url ex: http://your domain or ip /c/portal/saml/acs
Audience restriction ex : Liferay
Okta Metadata file : save it in xml and put it in the liferay.home/data/ directory

3: Creating keystore

Create keystore in the liferay.home/data/ directory using below command
keytool -genkey -keyalg RSA -alias Dinacs -keystore keystore.jks -storepass dinacs-validity 360           -keysize 2048

Enter the details and keep alias password as same as the keystore password.
It creates keystore.jks file in the liferay.home/data directory.

4:  Modify file

Navigate to liferay.home and open file .
Add below entries to the file and save it.

# Enable SAML Plugin
# Set the role to sp on the Service Provider side
# Set the SAML entity id, it matches the alias we used to setup the keystore
# The metadata location for Identity Provider
# Keystore
# keystore type
# location of the keystore
# pwd for accessing the keystore
# pwd for accessing the certificate of the entity in the keystore
# Service Provider
# the chicklet url from okta – your idp url
saml.sp.session.keepalive.url=http://your ip or domain :8080/c/portal/saml/idp/keepalive
# Service Provider user attribute mappings
#Set this to true to enable reminder queries that are used to help reset a user’s password.
# auto generate screen names

Step 5: Restart Server and Test SSO

Hit your liferay url and if you are not logged in then it will redirect you to the okta login page , after entering login credentials , Okta will redirect back to the liferay . User will be created in the liferay portal and will see it logged in.