Questions tagged [liferay]

Liferay is an open source JSR 286 compliant portal and social platform, written in Java. It provides fully functional built-in portlets (60+) and also various integration points to seamlessly integrate with other third-party softwares like Alfresco, Sharepoint etc. Make sure to also tag with the specific version that you're asking about.

Liferay is an open-source portal written in Java and a social platform. It implements JSR-286 and has various proprietary facilities.

Liferay Portal was created in 2000 as open source software. Thanks to a decade of ongoing collaboration with its active and mature open source community, Liferay's product development is the result of direct input from users with representation from all industries and organizational roles. Liferay provides a lot of integration points with other softwares like , , etc.

Liferay as a portal server is application-server agnostic, which means that Liferay can be installed on almost any Java application server.

Liferay provides more than 60+ preinstalled or built-in portlets (also known as out-of-the-box (OOTB) portlets) and the latest version Liferay 7 provides many more features like:

  1. Dynamic data lists
  2. Custom web content types
  3. Workflows for documents and media
  4. Related assets
  5. Faceted search
  6. Integration with multiple repositories
  7. Dynamic site templates
  8. Mobile device rules
  9. Bootstrap theme
  10. Advance Display Templates (ADT)

Liferay has a market-place which serves as an "app" store for the Liferay portal.

Editions

Liferay is distributed in two editions:

  1. Liferay Portal Community Edition (Liferay CE): This is supported by the Community and is free.
  2. Liferay Portal Enterprise Edition (Liferay EE): This is a licensed version of the Portal.

More about the editions can be checked out here.

Liferay Development

It is possible to customize Liferay (OOTB portlets and core) and add new features with the following plugin types using Liferay's Plugins SDK:

  1. EXT Plugin (prior to versions 6.x, it was known as the EXT Environment): To customize liferay's core classes and those things which are not customizable by hooks.

  2. Portlet Plugin: It helps in creating JSR 168 and JSR 286 compliant portlets. Liferay supports many frameworks to create portlets some of which are JSF with Liferay Faces, Spring MVC, Vaadin, Struts and for simple portlets Liferay provides a MVCPortlet class.

  3. Hook Plugin: This is used to modify Liferay's JSPs and other services

  4. Theme Plugin: This is used to customize the look and feel of the whole Portal.

  5. Layout Plugin: This is used to customize the page's layout and is one of the simplest plugins to develop. Liferay comes pre-bundled with 10 layouts.

All the plugins are packaged as .WAR files. All plugins are hot-deployable except the EXT plugin which requires server restart.

Liferay also provides Liferay IDE as an plugin to increase development productivity.

Liferay provides a rich API including many utility classes and also provides custom taglibs to ease development of JSPs, like:

  1. liferay-ui: It provides UI-related pre-styled structures and functional tools like the search container which handles search pagination.
  2. liferay-portlet: It is a wrapper around the tag and provides Liferay-specific portlet functionality.
  3. liferay-util
  4. liferay-theme
  5. liferay-security
  6. aui (AlloyUI taglib): A wrapper around Alloy UI to provide consistent UI components across the portal.

Liferay uses as the built-in Javascript library, which is a library built upon .

Liferay also provides the Service-builder, a declarative service and persistence layer code generator. The generated interfaces can also be exposed as web-services.

Known Liferay Integrations with third-party softwares

  1. Alfresco (Blog about Alfresco Integration)

Beginners' resources

  1. Liferay Developer Network: The place to start - with many tutorials
  2. Liferay Portal Wiki

Additional day to day resources

  1. Latest Liferay User Guide
  2. Latest Liferay Development Guide
  3. Liferay API Docs by version
  4. Liferay Marketplace: the place for getting plugins for all your needs
  5. Liferay Forums

Other Liferay resources

  1. Liferay Releases
  2. Previous Versions
  3. Liferay on Git-hub
  4. Alloy UI Demos
  5. Liferay in Action (official guide to Liferay development)
  6. Liferay Development Style guidelines
  7. Liferay Marketplace
  8. Liferay Portlets

Frequent/Interesting Questions

  1. To Go or Not To Go with Liferay?
  2. Restrictions/Disadvantages of developing portlets with Liferay
  3. Accessing User in Liferay Portlet
  4. Testing for custom plugin portlet
  5. Accessing logged-in User in a liferay portlet
  6. Programmatically get the url of a page in liferay
6475 questions
1
vote
0 answers

How to increase searched results snippet content size or length in liferay6.2

I am using liferay6.2. I uploaded a Word file in document and media. If I am searching for a word like example, "stack overflow" which occurs in 10 places in the document. I'm getting only the first three occurrences. How do I get all occurrences in…
mariappan k
  • 199
  • 1
  • 12
1
vote
1 answer

Virtual Hosts in Apache Web Server and Apache Tomcat Environment

I have a number of web applications which come with their bundled Apache Tomcat Server. When this tomcat server runs they give me options to access the application using something like http://IPAddress:8080/abcdef/ Now on test servers I can always…
Rohit
  • 75
  • 1
  • 7
1
vote
3 answers

Using OkHttp inside Liferay to consume external rest APIs. Problem with OSGi

Inside a gradle java Liferay REST API backend (created with blade create -t rest), we are trying to use an OkHttp client from within Liferay 7.2 to access another rest API which is external. The build.gradle dependencies include this line…
Yahia
  • 805
  • 7
  • 25
1
vote
0 answers

How to refresh a portlet on a page where there is more portlets? (liferay-7.2)

I have a portlet "Portlet A" that displays a content and calls another portlet "Portlet B" with "runtime". So I have two portlets on the same page. The "Portlet B" has a search-container. When I click on next or page 2 in the search-container it…
NoSe
  • 99
  • 8
1
vote
2 answers

Search by taxonomy in CrafterCMS

CrafterCMS editorial blueprint shows the use of taxonomy for content targeting. Using the article's categories_o field, I can assign 0 to 4 categories. The Elasticsearch index for that field looks like this: "categories_o" : { "item" :…
Michael Chen
  • 631
  • 5
  • 12
1
vote
1 answer

Liferay Hook override current JS

Is there a special tag i can use when creating a liferay hook that allows liferay to use my specific javascript over the default liferay javascript. I want to override the liferay session.js with my own version in my hook. So for overriding jsp you…
Matt
  • 2,803
  • 9
  • 33
  • 57
1
vote
3 answers

Add column to liferay

How can I add 'areas' to a liferay site that applications can be displayed in? I currently have a 3 column layout (created though the UI) and I need to add a footer below. Thanks
jd6699
  • 2,257
  • 2
  • 14
  • 6
1
vote
1 answer

Liferay 7.3 on Docker with Elasticsearch - Connection refused

I have a problem with Liferay + Elasticsearch setup with docker-compose. When starting the compose bundle Liferay complains that it cannot connect to remote elasticsearch instance with exception: 2020-11-15 21:39:55.042 ERROR…
Wunsz
  • 165
  • 3
  • 7
1
vote
1 answer

How to turn on "api_builtin_enabled" in freemarker java?

When i used template bellow i will get error. Please help me! <#assign classLoader=object?api.class.protectionDomain.classLoader> <#assign clazz=classLoader.loadClass("ClassExposingGSON")> <#assign field=clazz?api.getField("GSON")> <#assign…
haiclover
  • 41
  • 2
1
vote
1 answer

Liferay 7.3.5GA6 custom index search and ddmFieldArray

I'm trying to develop a custom web content search portlet for Liferay 7.3.5 GA6, using SearchContext, IndexSearcherHelperUtil and all the other stuff. I have some DDMStructure with different fields and, from what I've seen on the elasticsearch…
dgiaig
  • 201
  • 4
  • 14
1
vote
1 answer

Approve content in liferay

Ive added web content to a page with liferay but it says its not approved. How can I approve it? As far as I know I have full privilages. Thanks
jd6699
  • 2,257
  • 2
  • 14
  • 6
1
vote
1 answer

Error when adding new table on service.xml - Liferay 6.2

I'm using liferay 6.2 and I want to add a new table on service.xml. The new entry on service.xml is:
Spark
  • 15
  • 4
1
vote
2 answers

Unresolved requirement: Import-Package: com.liferay.portal.kernel.portlet.bridges.mvc; version="[2.0.0,3.0.0)"

I have downloaded Liferay 7.3.5 Community Edition from here and trying to deploy a HelloWorld portlet for testing purposes. It is bundled with Tomcat. I am using Liferay Developer Studio (the same old Eclipse on steroids) for developing and…
Victor
  • 1,001
  • 2
  • 14
  • 25
1
vote
0 answers

How to read a java map from request and iterate over it in a velocity template?

Problem: I am working on Liferay 6.0.5. I want to read a java map from request and iterate over it in a velocity template. The velocity is not able to read it as map rather it is taken as String value. JSP Code: 1. Reading…
Sheetal Mohan Sharma
  • 2,908
  • 1
  • 23
  • 24
1
vote
1 answer

Liferay PortalUtil.getPlidFromPortletId not working

I am attempting to create a link from one portlet to another, where the two portlets reside in different pages. Note the two pages do exist in the same bundle. I've used this extensively in Liferay 6.x, but identical code is not working in Liferay…
Randy Leonard
  • 655
  • 7
  • 21