The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

61.Explain Layout Templates?

Layouts are similar to themes, except they specify the arrangement of portlets on a page rather than their look and feel. You can create custom layout templates to arrange portlets just the way you like them. And you can even embed commonly used portlets. Like themes, layout templates are also written in Velocity and are hot-deployable.

62.Explain Portlet LifeCycle?

JSR 286 compliant portlet has 6 methods

  • void init(PortletConfig config)
  • void render(RenderRequest request, RenderResponse response)
  • void processAction(ActionRequest request, ActionResponse response)
  • void processEvent(EventRequest request, EventResponse response)
  • void serveResource(ResourceRequest request, ResourceResponse response)
  • void destroy()

63.Explain Portlet configuration?

The portlets available to the portal are defined in WEB-INF/portlet.xml (the JSR168 portlet descriptor file), and WEB-INF/liferay-portlet.xml (the liferay specific portlet descriptor file). Liferay specific configuration includes options such as:
Are the preferences of the portlet unique for each individual page (a.k.a. layout) that contains it? Are the preferences owned by the group (a.k.a. community) that the user is in (i.e. is there a single configuration for the entire group?)

64.Difference between View mode and Edit mode of a portlet?

Edit mode is to set the configuration options of the portlet and View mode is nothing but display of Liferay portlets in portal.

65.How LDAP authentication works in Liferay?

The LDAP class that handles the connection and search of LDAP is LDAPAuth. LDAPUtil is used to help grab attributes.
In portal.properties, LDAP is part of the authentication pipeline:
auth.pipeline.pre=com.liferay.portal.security.auth.LDAPAuth
When using By Screen Name as user authentication method, the following LDAP filter can be used to match the entered login name:
(cn=@screen_name@)

66.What is Inter-portlet communication?

The first version of the portlet specification, JSR-168, did not include any support for Inter Portlet Communication. The second version, JSR-286, which is supported by Liferay since version 5 does. IPC can be achieved in following ways

  • Standard IPC introduced in JSR-286 (Portlets 2.0)
  • The Client side events mechanism
  • AJAX way
  • Session variables sharing
  • Use Liferay portlet url tag

67.What is Liferay Service Builder?

Service Builder is a model-driven code generation tool built by Liferay that allows developers to define custom object models called entities. Service Builder generates a service layer through object-relational mapping (ORM) technology that provides a clean separation between your object model and code for the underlying database. This frees you to add the necessary business logic for your application. Service Builder takes an XML file as input and generates the necessary model, persistence, and service layers for your application.

68.How to override portal properties?

Using portal-ext.properties we can override the portal.properties of Liferay.

69.Can we configured multiple domains on a single Liferay instance?

Yes, we can configure multiple sites and assign domains to those sites.
To configure domain URL to site, go to
Control Panel –> Sites –> Click on site (Example QuizDocs) –> Go to
Site Settings –> Click on site URL. Under virtual hosts configure domain URL for public and private pages respectively

70.How to set a base theme?

Liferay’s themes are built on top of two base themes, named _unstyled and _styled. If you have another theme that you’re rather base yours on, you can do that by setting the theme of your choice as the base for your theme.

71.How to associate theme thumbnail?

Here are the steps for setting up a thumbnail image for your theme:

  • Create a thumbnail image. Make sure it’s 150 pixels wide by 120 pixels high. You may want to take a snapshot of your theme and re-size it to these dimensions. It is very important to abide by these exact dimensions or your image won’t display properly as a thumbnail.
  • Save the image as a .png file named thumbnail.png and place it in your theme’s docroot/_diffs/images folder (create this folder if it doesn’t already exist). On redeployment, your thumbnail.png file automatically displays as your theme’s thumbnail.

72.How to customize JSPs by extending the original?

Let’s say you want to add more content to one of Liferay’s JSPs, but you also want to benefit from any changes made to it as you upgrade Liferay. Rather than overwriting the JSP, you can instead create a new JSP in a hook and include the original JSP in the new JSP.

73.How to override a portal service using hook?

Hook plugins are the best tool for leveraging this architecture to customize portal service behavior. To modify the functionality of a service from a hook, you create a class that extends the service wrapper class, override the methods you want to modify, and instruct Liferay to use your service class to override those of the default class.

74.Creating an extension environment in Liferay?

Title : How to Create a extension environment in Liferay
*An extension environment can be created from Liferay portal source

  • The ext environment gives us complete control over the way the system behaves with ways to reconfigure default Liferay behavior
  • release.adave.properties
  • app.server.adave.properties
  • ant clean start build-ext (takes 7-8 mins)
  • ant clean deploy (takes 1-2 mins)
  • Configure root.xml on tomcat to connect to database
  • Run the app …

75.Using the plugins sdk in liferay

  • Plugins sdk can be used to create portlets and themes and deploy them to the Liferay portal
  • Easiest and fastest way to start building the enterprise portal application
  • Plugins are hot deployed to tomcat
  • Plugins are fully JSR compliant and plugins developed outside sdk can also be used
    *ant -Dportlet.name=”hello-world” -Dportlet.display.name=”Hello World ” create
  • ant -Dtheme.name=”sample-theme” -Dtheme.display.name=”Sample Theame “ Create
    *ant deploy

76.Why use Liferay?

Need a portal based application

  • Need rapid development and / or prototyping (Well, most projects do !)
  • Need collaboration e-commerce, internationalization

77.Liferay Basics?

Liferay is a portal server. This means that it is designed to be a single environment where all of the required applications (represented by individual portlets) can run, and these applications are integrated together in a consistent and systematic way.

78.Installing the social portlets?

The social portlets are all included with the Liferay Community Edition distribution, but need to be installed separately for Enterprise Edition. If you’re using Liferay Enterprise Edition, or had previously removed the social portlets from Community Edition, you can use Liferay’s plugin installer to easily add social features to your portal.
If you’re logged in as an adminstrator, go to the control panel, and in the Server section, click on Plugins Installation. From here, click on Install More Portlets and search for Social Networking. Once the results come up, select the latest version of the Social Networking Portlet, and then click Install. Once the install process finishes, you can start using the social networking portlets.

79.Social Networking with Liferay?

Since the first social networks rose to popularity, concepts such as Friend and later Like–previously reserved for direct human interaction–have taken on new meaning in an always-online, information driven culture. It could be argued that social networks have transformed the way people interact with their friends, relatives, and colleagues. Friends, connections, followers, circles, and lists have enabled people to connect and stay connected in ways they’d never been able to before. Initially, these concepts proved to be highly successful for casual web sites but they didn’t take to the business world as quickly. But now, more and more organizations are realizing the importance of leveraging social interactions for more than just recreation. Liferay’s robust social features make it a great platform for business web sites, casual web sites, and everything in between.
Liferay has a constantly improving set of social features which enable you to encourage social interactions on your own portal, and to leverage the power and popularity of other social networks. In this chapter, we’ll discuss:

  • General use social portlets
  • Social portlets for personal pages
  • Configuring personal pages for social networking
  • How to connect users using Liferay social relations
  • Social equity
  • Integrating Liferay with other social sites

When we’re finished, you’ll have a good idea how you can use Liferay to power your social network.

80.Purpose of portal-ext.properties?

portal-ext.properties contains various configuration parameters. These settings can be modified or further settings can be added. For example, there is no existing section for database pool in portal-ext.properties but one can add the same as described in question 25.

« Previous | 0 | 1 | 2 | 3 | 4 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com