Access Liferay JSON APIs. Headless approach

Company Blogs July 12, 2018 By Fady Hakim Staff

I did a quick video for how to access liferay web content using JSON APIs. You can check the details from here: https://youtu.be/as0TB9CloAk

What you need to do to access liferay JSON WS:

1 - Check all the properties of Liferay JSON Access. Go to
https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties and
look at the section of ## JSON


2 - To run my code, add those files into portal-ext.properties
json.service.auth.token.hosts.allowed=127.0.0.1,SERVER_IP
json.service.auth.token.enabled=false
jsonws.web.service.public.methods=*
jsonws.servlet.hosts.allowed=127.0.0.1,SERVER_IP


3- Access the JSON APIs from  http://127.0.0.1:8080/api/jsonws. In my example I
used the JOURNAL JSON APIs.

 

4 - the code is here:

https://drive.google.com/file/d/119fBu3pOlKRmVEEar_IyXVe5FhoyekaL/view

Liferay Mobile Strategy - ALL the details you need!

Company Blogs May 19, 2018 By Fady Hakim Staff

You want to know more about Liferay Mobile strategies? Check my new video series about Liferay Mobile. Let me know if you have any question.

Video 1 https://youtu.be/R48gQ6bnQpo

Video 2 https://youtu.be/lAT_XjEx8Do

Video 3 - Part 1 https://youtu.be/NOLtn4Y3W9E

Video 3 - Part 2 https://youtu.be/UsDTSF2aMPw

Video 4 https://youtu.be/H0ObNpXRAHU

Video 5 https://youtu.be/VIeyeAz2CXQ

Video 6 https://youtu.be/7bOlD4Xj2E8

 

For the script of the demos in those videos, you can download it from here: https://drive.google.com/drive/folders/12WsD0at0qPXdNFcnNudy6oIdGWwBnMu3

 

Liferay DXP Demo videos

Company Blogs April 2, 2017 By Fady Hakim Staff

I did 9 videos to demostrate Liferay DXP and I uploaded them on youtube:

 

Video 1: Introduction to Liferay DXP and the Demo
https://youtu.be/e3Vm36elwEY

Video 2: Liferay DXP Page & Content creation, Content Templates , localization, Workflow.
https://youtu.be/DWlikGcdQnw

Video 3: Liferay DXP Content permission, Asset publisher, Search
https://youtu.be/ykyX6d8f62A

Video 4: Liferay DXP Audience Targeting
https://youtu.be/yM6UvQnip4g

Video 5: Liferay DXP Staging
https://youtu.be/0uap-SwUl7c

Video 6: Liferay DXP Document Management
https://youtu.be/VFqlgyyNXFA

Video 7: Liferay DXP Blog, WIKI, Knowledge based
https://youtu.be/I0eQcQa2wTI

Video 8: Liferay DXP Forms and Integration.
https://youtu.be/wYP-fCDbERs

Video 9: Liferay DXP Collaboration and Intranet use case demo.
https://youtu.be/J3UBSMeQoj8

liferay 6.2-SP11 on JBoss 7.1

Company Blogs July 16, 2015 By Fady Hakim Staff

I will show you the steps to install liferay 6.2-SP11 on JBoss 7.1

1 - Download the below files:

     - JBoss 7.1 from here and unzip the folder, This directory is referred to as $JBOSS_HOME throughout this section

     - Liferay 6.2-SP11 EE WAR file from here

     - Liferay 6.2-SP11 EE dependencies jars from here

 

2 - Setup the Dependency Jars:

      - Create the folder structure “com/liferay/portal/main” under “$JBOSS_HOME/modules/.

      - Unzip the downloaded Liferay 6.2-SP11 EE dependencies and copy the jars inside the "main" folder created in the previous step.

      - depending on which database you will use, copy the required driver jar file in the "main" folder (I will add the driver for MySQL "mysql-connector-java-5.1.35-bin.jar" , I downloaded that from here , once you download the zip file unzip it and you will find "mysql-connector-java-5.1.35-bin.jar" inside the folder)

    - Create the file module.xml in the $JBOSS_HOME/modules/com/liferay/portal/main folder and insert the below contents, you can change mysql driver version depending on which one you want to use and you add it to the "main" folder (or remove it if you will not use MySQL) also inlude "<resource-root path="hsql.jar" />" even if you will not use hsql database.

=========================================

     <?xml version="1.0"?>

<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
    <resources>
        <resource-root path="hsql.jar" />
        <resource-root path="mysql-connector-java-5.1.35-bin.jar" />
        <resource-root path="portal-service.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>

============================================

 

3 - configure Jboss:

Please edit/add the below in "$JBOSS_HOME/standalone/configuration/standalone.xml". file.

 

  -  Add the below between the </extensions> and <management>:


 ==========================
  <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>
 =========================


 -  Add the attribute deployment-timeout=”240” in the “<deployment-scanner” tag:


 ====================
 <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="240"/>
 ====================


 -  Add the below security domain to the security subsystem <security-domains> defined in element <subsystem xmlns="urn:jboss:domain:security:1.1">


 =====================
<security-domain name="PortalRealm">
    <authentication>
       <login-module code="com.liferay.portal.security.jaas.PortalLoginModule" flag="required" />
    </authentication>
</security-domain>
 ====================


 -  Disable welcome root of the web subsystem’s virtual server default host by specifying enable-welcome-root="false".


 =========================
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
    <configuration>
          <jsp-configuration development="true"/>
    </configuration>
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <virtual-server name="default-host" enable-welcome-root="false">
       <alias name="localhost" />
       <alias name="example.com" />
    </virtual-server>
</subsystem>
 ========================


 - Add the following <configuration> element inside the web subsystem element <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

 

==============
<configuration>
        <jsp-configuration development="true"/>
</configuration>
 ===============

 

4 - Modify the startup script:

 a) if you are working on linux machine, remove everything in file "standalone.conf" at  "$JBOSS_HOME/bin/" folder and replace it with the below:

===========================================================

## -*- shell-script -*- ######################################################
##                                                                          ##
##  JBoss Bootstrap Script Configuration                                    ##
##                                                                          ##
##############################################################################

#
# This file is optional; it may be removed if not needed.
#

#
# Specify the maximum file descriptor limit, use "max" or "maximum" to use
# the default, as queried by the system.
#
# Defaults to "maximum"
#
#MAX_FD="maximum"

#
# Specify the profiler configuration file to load.
#
# Default is to not load profiler configuration file.
#
#PROFILER=""

#
# Specify the location of the Java home directory.  If set then $JAVA will
# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
#
#JAVA_HOME="/opt/java/jdk"

#
# Specify the exact Java VM executable to use.
#
#JAVA=""

if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
   JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman"
fi

# Uncomment the following line to prevent manipulation of JVM options
# by shell scripts.
#
#PRESERVE_JAVA_OPTS=true

#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
   echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi

# Sample JPDA settings for remote socket debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

# Sample JPDA settings for shared memory debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"

# Uncomment to not use JBoss Modules lockless mode
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false"

# Uncomment to gather JBoss Modules metrics
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true"


                    
                        JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true  -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
                    
               

=================================================================

 

 

    b)If you are working on windows machine edit "standalone.conf" at  "$JBOSS_HOME/bin/" folder with the below:

 

 

=====================================================

## -*- shell-script -*- ######################################################
##                                                                          ##
##  JBoss Bootstrap Script Configuration                                    ##
##                                                                          ##
##############################################################################

#
# This file is optional; it may be removed if not needed.
#

#
# Specify the maximum file descriptor limit, use "max" or "maximum" to use
# the default, as queried by the system.
#
# Defaults to "maximum"
#
#MAX_FD="maximum"

#
# Specify the profiler configuration file to load.
#
# Default is to not load profiler configuration file.
#
#PROFILER=""

#
# Specify the location of the Java home directory.  If set then $JAVA will
# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
#
#JAVA_HOME="/opt/java/jdk"

#
# Specify the exact Java VM executable to use.
#
#JAVA=""

if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
   JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman"
fi

# Uncomment the following line to prevent manipulation of JVM options
# by shell scripts.
#
#PRESERVE_JAVA_OPTS=true

#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
   echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi

# Sample JPDA settings for remote socket debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

# Sample JPDA settings for shared memory debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"

# Uncomment to not use JBoss Modules lockless mode
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false"

# Uncomment to gather JBoss Modules metrics
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true"


                    
                        JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true  -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
                    
               

=======================================================================

 

and edit "standalone.conf.bat" at  "$JBOSS_HOME/bin/" folder with the below:

 

=========================================================================

rem ### -*- batch file -*- ######################################################
rem #                                                                          ##
rem #  JBoss Bootstrap Script Configuration                                    ##
rem #                                                                          ##
rem #############################################################################

rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z dimitris@jboss.org $

rem #
rem # This batch file is executed by run.bat to initialize the environment
rem # variables that run.bat uses. It is recommended to use this file to
rem # configure these variables, rather than modifying run.bat itself.
rem #

rem Uncomment the following line to disable manipulation of JAVA_OPTS (JVM parameters)
rem set PRESERVE_JAVA_OPTS=true

if not "x%JAVA_OPTS%" == "x" (
  echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%"
  goto JAVA_OPTS_SET
)

rem #
rem # Specify the JBoss Profiler configuration file to load.
rem #
rem # Default is to not load a JBoss Profiler configuration file.
rem #
rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"

rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
rem set "JAVA_HOME=C:\opt\jdk1.6.0_23"

rem #
rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
rem # not set. Default is "java".
rem #
rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java"

rem #
rem # Specify options to pass to the Java VM. Note, there are some additional
rem # options that are always passed by run.bat.
rem #

rem # JVM memory allocation pool parameters - modify as appropriate.
rem set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"

rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"

rem # Warn when resolving remote XML DTDs or schemas.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"

rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"

rem # Set the default configuration file to use if -c or --server-config are not used
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.server.default.config=standalone.xml"

rem # Sample JPDA settings for remote socket debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

rem # Sample JPDA settings for shared memory debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"

rem # Use JBoss Modules lockless mode
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.lockless=true"


                        
                            set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true  -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"

                            :JAVA_OPTS_SET
                        
                   

===================================================

 

4 - navigate to the $JBOSS_HOME/modules/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" />

 

5 - Deploy Liferay

  1. If the folder $JBOSS_HOME/standalone/deployments/ROOT.war already exists in your JBoss installation, delete all of its subfolders and files. Otherwise, create a new folder $JBOSS_HOME/standalone/deployments/ROOT.war.

  2. Unzip the Liferay .war file into the ROOT.war folder
     

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

  4. Remove eclipselink.jar from $JBOSS_HOME/standalone/deployments/ROOT.war/WEB-INF/lib to insure the Hibernate persistence provider is used instead of the one provided in the eclipselink.jar.

Enjoy :-)

liferay 6.2-SP10 on JBoss EAP 6.2

Technical Blogs April 1, 2015 By Fady Hakim Staff

Hi All,

I will show you the steps to install liferay 6.2-SP10 on JBoss EAP 6.2

1 - Download the below files:

     - Jboss EAP 6.2 from here and unzip the folder, This directory is referred to as $JBOSS_HOME throughout this section

     - Liferay 6.2-SP10 EE WAR file from here

     - Liferay 6.2-SP10 EE dependencies jars from here

 

2 - Setup the Dependency Jars:

      - Create the folder structure “com/liferay/portal/main” under “$JBOSS_HOME/modules/.

      - Unzip the downloaded Liferay 6.2-SP10 EE dependencies and copy the jars inside the "main" folder created in the previous step.

      - depending on which database you will use, copy the required driver jar file in the "main" folder (I will add the driver for MySQL "mysql-connector-java-5.1.34-bin.jar" , I downloaded that from here , once you download the zip file unzip it and you will find "mysql-connector-java-5.1.34-bin.jar" inside the folder)

     - your "$JBOSS_HOME/modules/com/liferay/portal/main" folder should look like:

  

    - Create the file module.xml in the $JBOSS_HOME/modules/com/liferay/portal/main folder and insert the below contents, you can change mysql driver version depending on which one you want to use and you add it to the "main" folder (or remove it if you will not use MySQL) also inlude "<resource-root path="hsql.jar" />" even if you will not use hsql database.

=========================================

     <?xml version="1.0"?>

<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
    <resources>
        <resource-root path="hsql.jar" />
        <resource-root path="mysql-connector-java-5.1.34-bin.jar" />
        <resource-root path="portal-service.jar" />
        <resource-root path="portlet.jar" />
    </resources>
    <dependencies>
        <module name="com.liferay.portal" />
        <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>

============================================

 

3 - configure Jboss:

Please edit/add the below in "$JBOSS_HOME/standalone/configuration/standalone.xml". file.

 

  -  Add the below between the </extensions> and <management>:


 ==========================
  <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>
 =========================


 -  Add the attribute deployment-timeout=”240” in the “<deployment-scanner” tag:


 ====================
 <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="240"/>
 ====================


 -  Add the below security domain to the security subsystem <security-domains> defined in element <subsystem xmlns="urn:jboss:domain:security:1.2">


 =====================
<security-domain name="PortalRealm">
    <authentication>
       <login-module code="com.liferay.portal.security.jaas.PortalLoginModule" flag="required" />
    </authentication>
</security-domain>
 ====================


 -  Disable welcome root of the web subsystem’s virtual server default host by specifying enable-welcome-root="false".


 =========================
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
    <configuration>
          <jsp-configuration development="true"/>
    </configuration>
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <virtual-server name="default-host" enable-welcome-root="false">
       <alias name="localhost" />
       <alias name="example.com" />
    </virtual-server>
</subsystem>
 ========================


 - Add the following <configuration> element inside the web subsystem element <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">

 

==============
<configuration>
        <jsp-configuration development="true"/>
</configuration>
 ===============

 

4 - Modify the startup script:

 a) if you are working on linux machine, remove everything in file "standalone.conf" at  "$JBOSS_HOME/bin/" folder and replace it with the below:

===========================================================

## -*- shell-script -*- #########################
##                                                                          ##
##  JBoss Bootstrap Script Configuration                                   
##                                                                          ##
#########################################

#
# This file is optional; it may be removed if not needed.
#

#
# Specify the maximum file descriptor limit, use "max" or "maximum" to use
# the default, as queried by the system.
#
# Defaults to "maximum"
#
#MAX_FD="maximum"

#
# Specify the profiler configuration file to load.
#
# Default is to not load profiler configuration file.
#
#PROFILER=""

#
# Specify the location of the Java home directory.  If set then $JAVA will
# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
#
#JAVA_HOME="/opt/java/jdk"

#
# Specify the exact Java VM executable to use.
#
#JAVA=""

if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman"
fi

# Uncomment the following line to prevent manipulation of JVM options
# by shell scripts.
#
#PRESERVE_JAVA_OPTS=true

#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi

# Sample JPDA settings for remote socket debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

# Sample JPDA settings for shared memory debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"

# Uncomment to not use JBoss Modules lockless mode
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false"

# Uncomment to gather JBoss Modules metrics
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true"



JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true  -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"

=================================================================

  b)If you are working on windows machine edit "standalone.conf.bat" at  "$JBOSS_HOME/bin/" folder with the below:

   - Comment out the initial JAVA_OPTS assignment as demonstrated in the following line:
 
    rem set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
 
   - Add the following JAVA_OPTS assignment one line above the :JAVA_OPTS_SET line found at end of the file:


 ===================
    set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.security.manager -Djava.security.policy=$JBOSS_HOME/bin/server.policy -Djboss.home.dir=$JBOSS_HOME -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"

====================

 

4 - Deploy Liferay war
 
  - Create a folder “ROOT.war” under the “$JBOSS_HOME/standalone/deployments/” location.

  - Unzip the Liferay 6.2-SP10 EE WAR file into the ROOT.war folder.

  - Create an empty file named ROOT.war.dodeploy in the same "$JBOSS_HOME/standalone/deployments/" folder.

  - Start  JBoss server: go to /jboss-eap-6.2/bin and run "./standalone.sh"

 

Enjoy :-)

 

 

 

 

 

Audience Targeting Webinar

Company Blogs March 11, 2015 By Fady Hakim Staff

 

For anyone wasn't able to attend our webinar about audience targeting, you can check the recorded video here

 

The Audience Targeting app raises the engagement experience of your portal to a whole new level. This app allows you to segment your audience and create campaigns to target content to user segments. It also allows you to track user actions and generate reports that provide insight into the effectiveness of your campaigns. Content targeting provides a personalized web experience, increases engagement through more relevant content, and improves the quantity and quality of leads with more effective call to actions. Learn what Liferay's new Audience Targeting app can do for you.

 

Liferay vs Sharepoint

General Blogs October 22, 2014 By Fady Hakim Staff

In the ever changing world of enterprise IT, our commitment to innovation, value, and service gives you the assurance that Liferay will meet or exceed your expectations today, and remain a critical part of your future strategic growth. Liferay is compatible with a wide range of infrastructure and enterprise applications, and can provide a seamless experience with your existing investments.

For the past several years, Liferay has had the fastest-growing Java-based portal and compared to sharepoint, we believe that liferay is a better choice for your business because:

    1 - rich out-of-the-box (OOTB) functionality compared to sharepoint: core portal, content management, collaboration, social, mobile, security, responsive design, mobile SDK and more.

    2 -  Liferay has the lowest Total Cost of Ownership (TCO) compared to Microsoft sharepoint. Downloading it and getting it running takes a matter of minutes. And the savings continue through development costs, operational costs, and training/support costs (from the perspective of infrastructure, developers, administrators, and end users). Moreover, All portal products typically need extensions and/or additions to deliver requisite functionality – with Liferay you can simply do more within a specific budget

    3 -  Liferay is a mature Enterprise Open Source (fully supported) product while sharepoint is a closed source. please check the below white paper for the benefits of open source vs closed source: http://opensourceconference.co.uk/files/2014/03/Open-vs.-Closed-Source.pdf

    4 - Liferay’s hook and extension plugin model allows you to tailor product behavior to your needs without rewriting from scratch and without creating "upgrade". With sharepoint, if an OOTB feature meets 80% of your need, then getting the remaining 20% might be difficult and expensive, or worse, you may need to live with the limitations or recreate the functionality from scratch.

   5 -  Liferay offers you a full choice of application servers, databases, and operating systems to run on, thereby allowing you to leverage your infrastructure and skills investment while with sharepoint you don't have any choice, you are locked with Microsoft and .net framework.

   6 - As an open source portal, Liferay community members are extremely active with increased contributions to forums, wiki posts, blogs, code contributions and activity in special projects teams. The community contributes greatly to the product functionality as well as product information/support.

    7 - Liferay’s open architecture and its open source nature help you avoid lock-in to a single proprietary vendor as what is happening with sharepoint as you get lock with microsoft. Liferay adheres to several specifications including JSR-168 (Java Portlet Specification v1.0), JSR-286 (Java Portlet Specification v2.0), JSR-170 (Java Content Repository Specification), JSR-127 (JavaServer Faces), WSRP 1.0, WSRP 2.0, WebDAV , SAML , and more. it runs in any IT environment, cutting down on costs and leveraging your existing investments of hardware, software, and staff:

Application servers:

 Liferay: GlassFish JBoss, Tcat , tcServer, Tomcat, Weblogic, WebSphere,..
 Sharepoint: Embedded; requires Microsoft IIS Server.

Servlet Containers (stand - alone) :

  Liferay: Jetty, Resin, Tomcat.
 Sharepoint: None.


Operating System:

  Liferay: Liferay Portal runs on any major operating system.
  Sharepoint: Windows only.

Database:

  Liferay: Any RDBMS supported by Hibernate.
  Sharepoint: Microsoft SQL Server.

Framework Support:

  Liferay: Struts, Spring MVC, JSF 1.2, Seam, Tapestry.
  Sharepoint:Required custom implementation


Scripting Language Support:

 Liferay: PHP, Ruby, Groovy, Python, JavaScript
 Sharepoint: Required custom implementation

Standards

 Liferay: JSR-186, JSR-286, JSR-170,CMIS,WSRP 1.x,WSRP 2.0,JSR-252, WAP
 Sharepoint: WSRP 1.x


  8 - Liferay is based on java while Sharepoint is based on Microsoft .NET.
        - Java is very known for enterprise applications because it has better scalability , security and  performance in the heavy transactional environments.
        - because lot of vendors created different frameworks on the top of java, whenever you use liferay, you have the freedom to chose any framework you want to develop your portlets while
           with sharepoint, you don't have any choice other than what microsoft offer you.
        - experts and communities of developers who know java and much bigger and more mature than Microsoft side.


  9 - Liferay is a very light product (the software is around 200 MB) where you can download and install it in 2 simple steps while Sharepoint is very complex, involve different products to be installed and certain complex steps to follow to start and shutdown the server. sharepoint needs 8 GB minimum of memory to run while liferay can run with only 1 GB.

 

Conclusion:

Liferay’s unique approach to building an open platform, based on open standards, gives you all of the power and flexibility you need.Whether you use the pre-packaged applications, or want to build a customized solution through our enterprise application integrations,Liferay delivers immediate results and long-term value.

Unlike SharePoint, Liferay runs in non-Microsoft environments, is easy to customize, and integrates with your existing applications.Not only is it built with full Java support for sophisticated integration work, Liferay Portal also supports multiple languages and frameworks.On average, our clients see savings of up to 90% over that of commercial competitor pricing.

Integrate Amazon search using AWS inside your liferay portal

Technical Blogs October 15, 2014 By Fady Hakim Staff

In this blog I will show an example on how we can integrate external applications/services inside your liferay portal.

In my example I created 2 portlets that you can use to integrate amazon search inside your portal page.

Portlet 1: "Amazon Search"

Portlet 2: "Amazon result".

If you want to run this demo  please follow the below steps:

1 -  create your ID from  http://aws.amazon.com
2 - use the AccessKey Id and register it for Product Advertising API at https://affiliate-program.amazon.com/gp/flex/advertising/api/sign-in.html .
3 - after you upload your WAR file to liferay portal. drag and drop the 2 portlets on a page.

4 - at portlet 1 "Amazon search"  click the "preference" link

5 - add the "Access Key: " and the "Secret Key: " that you create it in the 1st step

6 - this search is for "toys" category, you can edit the code to do search anywhere.

7 - in the search result portlet, you can click on the "details" link to go to amazon page.

 

you can download the code from here and the WAR file from here

if you will use the WAR file without building the code, please make sure you have JDK 7

 

Enjoy :-)

 

Thank you.

Portlet vs Widget

Technical Blogs October 10, 2014 By Fady Hakim Staff

I got this question a lot, specially after the javascript frameworks start to show up in the enterprise applications, what is better, portlets or widgets? why?

-The most obvious different between portlet and widgets is that portlets are a server side component model (designed to execute on the server) and Widgets are client side component models (designed to run in the browser container) but  Portlets can bleed into the client as well in that more and more web interactions use AJAX for improved responsiveness, and also Portlets can emit markup that is basically a Widget to run in the browser container.
Also Widgets do have a problem if you are trying to create a more enterprise type portlet. Most of the organizations have lot of backend data processing and lot of logic or data manipulation required then using a language like Java, or doing that processing on a server vs. on a client is a better choice.

-The bad of Widgets is that their source code is downloaded and visible in the browser. sometimes this is can be a security problem as you expose the logic of your applications to the public.

- Portlets are the most mature of the choices and is covered by second versions of widely adopted Java and Oasis standards.  Widgets are relatively new and you should expect some amount of evolution and possible churn as the industry moves to standardization.
Moreover, Portlet spec is continually being defined and current.  Portlet 3.0 aka JSR-362 (https://jcp.org/en/jsr/detail?id=362) is being worked on actively by the likes of IBM, Oracle, Apache, Liferay, Red Hat, Vaadin, and others in the expert group listed on that JCP page.

- with widgets, as all the logic in on the browser, you probable will spend more time testing against different browser types based on how much logic you put into the browser.

- Portlets work best when you have interaction between portlets and pages. That’s not to say that widgets don’t pass data parameters around but portal and JSR 286 have matured enough to make it much easier to user.

- Liferay portlets have better UI interaction like mobile responsive design (redesign the UI to fit into a mobile), drag and drop it on the page or move it around. iGoogle doesnt even have this at the level that Liferay have and it is much “clunkier” feeling. Here are some blog posts with some good screenshots:

 
 
Hope that will help you :-)

Why I need a portal ? I can develop anything

Technical Blogs October 10, 2014 By Fady Hakim Staff

There is a big difference between Liferay Platform, and any other framework/Web Application.

In general, Developers can develop anything, but the question is how long it will take them to do that and how much you will spend on development, maintenance, support...also the quality of the code is not always guaranteed.

With liferay, we make that work for our clients. we have hundreds of the best developers around the world to create liferay platform with all the underlying integration, complex services and hundreds of out of the box features (content management system, document management system, integration platform, identity management, collaboration, campaign manager, audience targeting, single customer view… and much more) so that our clients can concentrate only on the business side of the platform.

Instead of spending years to develop a website with integrated services, you can spend months or even weeks to have a fully functional website.

Moreover, with liferay we support our clients in all the development/production phases to make sure they are always have a stable environment with the latest security updates and up to date with all the new technologies. Which mean for example if a new collaboration technology/portlet standard/ content management feature show up, our clients will find this option/standard available in future releases, integrated ready to use with their current environment.

Liferay is a hot deployable environment, which mean at the runtime, you can add any new application/themes/customization...without any downtime or interruption for the service. In any developed web application, you will always ask for downtime for any change and it will involve a team of developers/admins to do that for you. Moreover, With Liferay Platform, we offer the staging feature where you can have 2 separate environments, one for staging and the other for production, and create all your pages/contents on the staging one, test it, and with a click of a button you can move all what you did to the production environment with no need to involve technical people.


Also With Liferay, you can use any J2EE framework to develop your integration with external/internal systems. For the back-end service layer, you can use a frameworks like Spring, Struts and Liferay service builder, or you can simply use JSP or JSF pages if you don’t have a complex service layer. Moreover, if desired, you can use any JavaScript framework: AngularJS, NodeJS, EXTJs, BackboneJs, etc. We give the freedom to our clients to choose what they want based on their needs.

Showing 10 results.
Items 20
of 1