Liferay Interview Questions and Answers



Comments



Description

Liferay interview questions and answers-21) What are the various ways in which you can customize the default behavior of Liferay that ships to you? Ans) One can customize Liferay by writing: Portlets Themes Layout Templates Webs Hooks 2) What is the difference between a Liferay Hook and Liferay EXT? Ans:Hook: Hooks is a feature to catch hold of the properties and JSP files into an instance of the portal as if catching them with a hook. Hook plugins are more powerful plugins that come to complement portlets, themes, layout templates, and web modules. A hook plugin is always combined with a portlet plugin. For instance, the portlet social-portlet is a portlet plugin for Social Office with hooks. In general, hooks would be very helpful tools to customize the portal without touching the code part of the portal. In addition, you would use hooks to provide patches for the portal systems or social office products. source:Liferay Portal 6 Enterprise Intranets EXT: EXT is used to customize and extend the Liferay portal. EXT builds a new ROOT webapp and replaces by a huge build mechanism your existing Liferay portal. The Liferay EXT Environment is where you would ideally make changes to the portal itself. In other words, this is where you customize or “extend” the portal. You may ask, “Why can’t we just make the changes to the portal source directly?” The answer is that you technically CAN, but if and when you have to upgrade, you will have a tough time sorting out what is out-of-the-box and what is customized. EXT Environment keeps things separate. 3) Suppose I want to customize the behavior of Calendar portlet that comes out of the box with Liferay, how can I do that? Ans: The behavior of Calendar portlet can be modified using EXT or write a separate Calendar portlet meeting the user requirements. 4) How will you configure Liferay to authenticate users from LDAP? Ans: Go to configuring liferay with LDAP 5) What is inter portlet communication and how can that be achieved? Ans: Inter portlet communication (IPC) was introduced in JSR 286 More reading: http://www.liferay.com/web/james.min/blog/-/blogs/241107 http://www.liferay.com/community/wiki/-/wiki/Main/Inter-portlet+communication 6) What is the difference between view and edit modes of a portlet? Ans: view mode is what is displayed a user logs in to the liferay portal and various portlets are displayed to him. edit mode is the configuration options that are displayed when the edit button is clicked on the portlet. 7) What is service.xml and how will you use Liferay service builder? Ans: service.xml is a configuration file which consists the details for database entities that are used in a portlet. The service builder uses the service.xml to generate the DAO/DTO classes for a portlet. service.xml is also used by the Liferay server to create the database tables and columns for entities mentioned in service.xml. 8 ) Suppose I have a portlet written for Liferay 5.2.3 and I want to run it on Liferay 6, how can I do that? What if I get some spring and hibernate related exceptions with Liferay 6? Ans: It is very difficult to find the technology updates done in Liferay versions. The plugins SDK was modified in Liferay 6 so if your Liferay 5.3 portlet doesn’t run properly on Liferay 6 then it is better to write a new portlet for Liferay 6 rather than trying to modify the portlet or source code for Liferay 6. 9) There is a requirement from the client that out of 4 portlets that you have written only 2 Thanksgiving. Website planning and updating made easy—Multiple teams can work on several variations of a site simultaneously (e. and wikis.) into terms familiar to the end user. The server itself takes care of transactions. tasks tracking and managing issues. “Speaking my language”—For each document type (i. Christmas variations) and schedule publication dates for each. financial report. message boards. and other media types are now stored in a single unified library.1. These settings can be modified or further settings can be added.should be visible to a particular category of users. 11) What steps will you follow to change the layout and theme of the portal pages? Ans: Follow this excellent guide for Liferay theme and layout customization 12) Suppose I want to change the background color of the footer in Liferay.g. 16) A client has two different portal applications for Sales and HR department. The code generated using Service Builder can also be used with the need to think about transaction management. etc.properties? Ans: portal-ext. How will you achieve that? What if some fields in the remaining 2 portlets have also to be controlled based on user role? Ans:--10) What is the purpose of portal-ext.e. reporting period.properties but one can add the same as described in question 25. 18) How will you make the user to go from one JSP to another JSP page in a portlet? Ans: The hyper links to other JSP pages should be encoded using renderURL tags as shown below: . b) Mount multiple repositories (e.g. etc. a) Documents. such as linking an invitation list to a Christmas party calendar event. d) Specific pages and page areas can be designated as user customizeable Dynamic site templates become an option—changes to the parent template force changes on any associated children sites.. Alfresco. How will you achieve that? Ans: Two instances of the server can be made to run on single machine which will make the two instances to run on different ports but with same IP address. RenderResponse renderResponse) method after overriding the MVCPortlet class.e. audio. c) Enhanced staging means automatic versioning with history. Halloween. there is no existing section for database pool in portal-ext. For example. how will you take care of transaction management. e) Users can create Sites without the need to designate ties to Organizations or Communities. The configuration for running multiple Liferay servers on single machine is dependent upon the server being used like Tomcat.properties contains various configuration parameters. video. author. 14) What improvements would you like to see in Liferay 6 portal? Ans: There is no end to what features a CMS server can provide. g) Open participation is encouraged in 6. Direct links between web content enables users to specify relationships. what steps should I follow? 13) Which JSR is being implemented by Liferay? Ans: JSR 286 which is the reference for Portals from Oracle. Documentum) while maintaining a common UI. and preview based on scheduled publications. Ans: There is no need to worry about transaction management when using the Liferay server. The steps to run multiple Tomcat instances on Linux are given Run Multiple Tomcat Instances. f) Data lists can be published as workflow-enabled forms that capture information such as an RSVP. surveillance video. JBoss and GlassFish etc. 17) What are the minimum Java methods one needs to override in order to write a portlet? Ans: One needs to override the doView(RenderRequest renderRequest. images.1—users who have yet to create Liferay accounts can still rate content and have their say in forums.. Liferay. 15) There are 1000 users using the portlet developed by you.) administrators can customize metadata (i. For good and valid points read the following which are the changes done in Liferay 6. The client wants to run these portal applications on same server but with separate URL’s like http://ip:port/sales and http://ip:port/hr. undo support at the site and page level. /portlet:renderurl&a mp.gt.80&amp. &amp.lt. If the links don’t use render tags then the next JSP will open in a new window/tab in the web browser.base&amp.quot.maxActive&amp./portlet&amp.lt.lt.lt./category&amp.9&amp.lt.gt.gt.&amp.quot.portlet id=&amp.properties by adding the following snipped.lt.quot. &amp.default.lt.quot.91&amp.lt.gt.gt. One needs to use JDBC or other database interaction technologies in order to use different databases for various portlets.jdbc. See # com./category&amp.&amp.jspPage&amp. the property # &amp. &amp.&amp. For example.category.display&amp.lt.quot.jdbc.category name=&amp. The use of these render tags causes the next JSP page to open within the portlet window.portlet id=&amp..79&amp.quot.quot.gt.&amp.gt. &amp. &amp.xml. # .gt. the property # &amp.lt. is read by Primrose.gt. For hot deployment one can use the deploy target of ANT build script that ships with Liferay or use Eclipse plugin which also internally uses this ANT script.lt.cms&amp.alfresco&amp.gt.jsp&amp.quot.properties file is present in [tomcat_home]/webapps/ROOT/WEB-INF/classes/ # # Liferay can use C3PO.portlet id=&amp.dao.gt.gt.category name=&amp.liferay. Oracle and SQL Server) because of some legacy application requirements.gt. &amp.admin&amp.lt. or Primrose for connection pooling.lt.DataSourceFactoryBean for the actual # implementation.jdbc. How will you make them connect to different databases? Ans: Liferay server doesn’t support multiple database connectivity out of the box. # # The default provider is C3PO.gt.quot.gt.jdbc.quot. &amp. &amp.default.quot.quot.lt.lt. &amp./portlet&amp.acquireIncrement&amp.&amp.. &amp. &amp.gt. Provider specific properties can also be passed along # directly to the provider.quot.&amp.portlet id=&amp. ./portlet&amp. and the property # &amp. 25) Can you configure the database connection pool created by Liferay? Ans: One can configure database connection pool by editing portal-ext. is read by DBCP. 21) What is hot deployment feature of Liferay? Where will you place your portlets for them to be deployed without server restart? Ans: Hot deployment of Liferay portlets allows one to deploy/re-deploy portlets without the need to restart the Liferay server.portal.quot. DBCP.category. &amp.gt. 22) Does Liferay support email notifications out of the box for portlets involving workflow? 23) What is the purpose of mode and persistence packages which are created by the Liferay service builder? 24) If there are 3 portlets and all of them need to talk to different database systems (say MysSQL.util.lt.&amp.quot.lt. &amp.quot.quot. &amp.lt.quot./portlet&amp.gt.quot.40&amp.quot.&amp.quot.quot./myPage.display&amp.&amp.lt. 19) While building a service using service builder.lt.portlet:renderurl&amp./portlet:param&amp. &amp.xml? 20) How to control the category in which the liferay portlet created by me will be displayed? Ans: The category of liferay portlet can be controlled by using liferay-display. what is the purpose of specifying remoteservice=true in service. &amp. is read by C3PO. &amp.quot. The portal-ext.&amp.gt.gt.category name=&amp. The category is configured by adding the following: &amp.gt.gt.lt.quot. It is important to understand the strengths and weaknesses # of each provider so that you can choose the best one that fits your # deployment scenario./portlet&amp.default.portlet id=&amp.lt.&amp. value=&amp.&amp.category.quot.quot.portlet:param name=&amp./category&amp.&amp. .liferay.quot.apache.uk/primrose3/primroseConfig.jdbc.default.pool.acquireIncrement=5 jdbc.jdbc.provider=c3po #jdbc.pool. Log4j. Solr. 27) Suppose a client is pursuing a Liferay based solution to their requirements.html" rel="nofollow">http://www.org.default.default.provider=primrose # # The following properties will be read by C3PO if Liferay is configured to # use C3PO in the property &amp.default.org/dbcp/configuration.default.pool.default.quot. Spring.html#configuration</a> for a list # of additional fields used by C3PO for configuring database connections. HyperSonic.primrose. See # <a href="http://www.liferay.html</a> for a list of # additional fields used by Primrose for configuring database connections.dao.quot.provider=dbcp #jdbc.PortalConnectionCustomi zer jdbc.default.removeAbandonedTimeout=3600 # # The following properties will be read by Primrose if Liferay is configured # to use Primrose in the property &amp. # jdbc.maxActive=100 jdbc.idleTime=1800000 jdbc.default.default.defaultTransactionIsolation=READ_UNCOMMITTED jdbc.liferay. Quartz.liferay. Lucene. Java.primrose. Axis.minPoolSize=10 jdbc.g.liferay. Ajax.quot. # #jdbc. HTML. I am listing my list here: Struts.default. JSPWiki.provider&amp.default. Hibernate.default. See # <a href="http://commons. It uses Lucene for search Ans: One can go through the source code of Liferay and list the toll and technologies being used.org. Velocity.default. EHCache. ANT.default. Vaadin.pool.maxPoolSize=100 jdbc. Freemarker.jdbc.html" rel="nofollow">http://commons.base=100 #jdbc.default.minIdle=10 jdbc..idleConnectionTestPeriod=60 jdbc.default.transactionIsolation=1 # # The following properties will be read by DBCP if Liferay is configured to # use DBCP in the property &amp.com/projects/c3p0/index.jdbc.connectionCustomizerClassName=com.org/dbcp/configuration. what non-functional clarifications will you ask from the customer? Ans: The non-functional requirements to look out for are: a) Automated Startup on booting server b) Automated database backup c) Concurrent access to users d) Ability to add more user roles .. POI.maxIdleTime=3600 jdbc. Apache Commons.numberOfConnectionsToInitializeWith=10 26) Can you list down various tools and frameworks used by Liferay? e.liferay.mchange.uk/primrose3/primroseConfig. Xerces.portal.default.numHelperThreads=3 #jdbc. jFreeChart. CSS. # jdbc.html#configuration" rel="nofollow">http://www.pool. Xalan.default.html</a> for a list of additional # fields used by DBCP for configuring database connections.default.provider&amp.liferay. SLF4j.provider&amp.mchange.default.com/projects/c3p0/index.connectionTransactionIsolation=TRANSACTION_READ_UNCOMMITTED jdbc. JavaScript.apache.pool. See # <a href="http://www.quot.jdbc.default.c3p0.quot.default.pool. 3 to Liferay 6? Ans: Liferay website itself lists the steps for upgrading from 5. Copying the portlet war file to application folder of server will also cause the war file to deployed as portlet. 34) What advantages do you see in running the Liferay portal application on a application server like JBoss than running it on a web server like Tomcat? Ans: The decision about using application or web server is totally dependent on the fact that some portlets may be using EJB/JMS and hence would require application server instead of web server.lt.lt. The only difference is that the ant script has deploy target which causes the portlet war to be copied to the deploy folder of liferay server.28) Is there a build number associated to a portlet assigned by the service builder? Where can we find the current build number? 29) Have you tried the Liferay 6 Eclipse plugin? What all limitations have you found? 30) How do you log events in a portlet? Do I need to configure Log4J for every portlet or is there a common place where one can configure Log4J so that all Liferay portlets can use logging API? 31) Do you know how to update your setup of Liferay 5. 39) How will you setup a clustered Liferay portal on 5 servers available to you? . As far as Liferay is concerned. reduced coupling.true&amp. The list includes: Apache JetSpeed JBoss GateIn Oracle WebLogic Portal IBM Websphere Portal SAP NetWeaver 36) How will you implement i18n in a portal application? What if you want the user to choose his language preference? Ans: Follow the excellent guide on Liferay Internationalization 37) There is a portlet application for managing images similar to Flickr. 33) Is it a good design to meet the customer requirements by creating a single portlet or splitting them into multiple portlets? What criteria will you use to split the functionality into multiple portlets? Ans: It is better to split multiple requirements into individual portlets and the use inter-portlet communication for meeting the business requirements. Using the typical requirements.gt. there is no difference in features provided by Liferay depending upon server. to the corresponding liferay-portlet. what is the difference between pasting this war file in the deploy folder of Liferay and application folder of server (like webapps in case of Tomcat)? Ans: Pasting the portlet in the deploy folder of liferay will cause it to be deployed into the application folder of the server automatically when the server is started.maximize-edit&amp. Will Liferay allow you to do that? Ans: The full screen option can be displayed for any portlet by adding &amp. 32) Can I run my Struts 1. better maintainability. one can create separate portlets for Create.2. Delete and Search of each entity but you should have the user in confidence before making any UI decisions. The user wants to see the images in full screen.2. One should be though aware of how to take database backup and how to patch Liferay in general./maximize-edit&amp. The advantage of splitting functionality is enhanced usability.gt.3 based legacy application as a portlet application? How? Ans: Yes it is possible to convert legacy application into a portlet by making the legacy application to follow the requirements of a Liferay plugin and then deploying the same on Liferay server. 38) I have a war file of the portlet which is created using service builder.3 to Liferay 6. View. 35) What all other portals have you heard of? How do you compare them to Liferay? Ans: Other vendors have also rolled out portals which are reference implementation of JSR 286. Modify.xml of the particular portlet. java class.jsp) to be default view page than view. What is the benefit of this feature provided by Liferay? Ans: Using the build WSDL target of ANT. 45) How will you build a portlet that can be added only single or multiple times in to the portal application? Ans: The instanceable flag should be set to true in liferay-portlet. does Liferay provides any API out of the box to support search? 43) What are the various ways in which one can override the default behavior of Liferay? 44) The service builder can also build WSDL for you. do we not need a JDK and what is the purpose of bundled JRE? Ans: The JDK is required to create liferay portlets but the JRE is required for running the portlets 42) Suppose there is a requirement from client to implement search functionality in Liferay portlet. If a portlet should not work after some amount of inactive time period then it can be managed using Ajax calls and keeping track of inactive time in portlet code.java extends the MVCPortlet. What purpose does MVCPortlet.java? 50) Is it mandatory to have the view logic in view. The steps to create a web service portlet can be found Liferay Web Service portlets. 47) What is the flow of HTTP request in Liferay? 48) The JSPPortlet.xml present in the WEB-INF directory of every portlet application.java fulfill? 49) How do you perform Junit tests on your portlet? How do tackle the dependency on the MVCPortlet.jsp? Can one configure some other JSP (say MyJSP. If the value for this flag is false then a portlet can be added only once in the portal page 46) Is it possible to set a session time out for a portlet which is different from other portlets and the Liferay portal? Ans: No every portlet can not be configured to have a different session timeout interval than the portal itself. 40) How much user base can Liferay support without affecting performance? Ans: There are official numbers released by Liferay as shown below: 41) There is a JRE shipped with Liferay package. JSR 286 uses the term Web Services for Remote Portals.jsp? Posted by sunil G at 9:22 PM Email ThisBlogThis!Share to TwitterShare to Facebook No comments: Post a Comment Newer PostOlder PostHome Subscribe to: Post Comments (Atom) Blog Archive • • o  ► 2013 (2) ▼ 2012 (10) ▼ November (3) Liferay interview questions and answers-2 . A complete guide for Liferay clustering is available Clustering Liferay Tutorial.Ans: Clustering involves not only clustering server but also configuring various services within Liferay. one can deploy the portlet as a web service. . ► September (1) ► July (1) ► April (1) ► March (4) About Me sunil G View my complete .  o o o o Java Collections interview questions and answers Using sortTool in Liferay's Template and Structure..
Copyright © 2024 DOKUMEN.SITE Inc.