Rafik H Il y a 10 années Great article Peter !!Can you confirm answers for the questions:1 -- d : because jsp hook are runnig in portal classloader.2 -- a, b : because service hook is running in hook's classloader.3 -- a, c, d Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Rafik H Il y a 10 années - Edité @Rafik: That is correct. You passed the exam! :-) Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Rafik H Peter Mesotten Il y a 10 années Good Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Kailash Yadav Rafik H Il y a 10 années Why not option 'c' in Questions 1 and 2? Portal and portlets also have access of lib/ext (global classpath). Please currect me if I am wrong? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Kailash Yadav Kailash Yadav Il y a 10 années I got the answer I was wrong Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Luboš Vrba Kailash Yadav Il y a 8 années Because the JAR is already in ROOT's lib directory Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Michal Sima Rafik H Il y a 9 années Does silence of Peter implies his consent? ;-) Are those answers correct? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Michal Sima Rafik H Il y a 9 années Does silence of Peter implies his consent? ;-) Are those answers correct? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Michal Sima Il y a 9 années @Michal, as I've confirmed before in this thread the answers of Rafik are correct indeed :-) Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Rafik H Il y a 10 années - Edité @Rafik: That is correct. You passed the exam! :-) Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Rafik H Peter Mesotten Il y a 10 années Good Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Rafik H Peter Mesotten Il y a 10 années Good Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Kailash Yadav Rafik H Il y a 10 années Why not option 'c' in Questions 1 and 2? Portal and portlets also have access of lib/ext (global classpath). Please currect me if I am wrong? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Kailash Yadav Kailash Yadav Il y a 10 années I got the answer I was wrong Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Luboš Vrba Kailash Yadav Il y a 8 années Because the JAR is already in ROOT's lib directory Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Kailash Yadav Kailash Yadav Il y a 10 années I got the answer I was wrong Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Luboš Vrba Kailash Yadav Il y a 8 années Because the JAR is already in ROOT's lib directory Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Michal Sima Rafik H Il y a 9 années Does silence of Peter implies his consent? ;-) Are those answers correct? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Michal Sima Rafik H Il y a 9 années Does silence of Peter implies his consent? ;-) Are those answers correct? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Michal Sima Il y a 9 années @Michal, as I've confirmed before in this thread the answers of Rafik are correct indeed :-) Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Michal Sima Il y a 9 années @Michal, as I've confirmed before in this thread the answers of Rafik are correct indeed :-) Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Harish Kumar Il y a 10 années Nice Explanation! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Tejas Kanani Il y a 10 années Great Article with nice coverage of Liferay Classloading principles !!! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Balaji Murugesan Il y a 10 années Nice write up.. Got a clear understanding of Liferay's classpath Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Tom Wilbourn Il y a 10 années What versions of Liferay is this true? Are the jars loaded from the temp directory if running in tomcat? We've also had issues where one portlet had an older version of a dependency and this was loaded in the classpath for a different portlet which had a newer version of the dependency instead of the newer version. This really caused a problem. Our dependencies are managed by maven and the jars include the version in the names. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Tom Wilbourn Il y a 10 années @Tom- The principles are not bound to a certain Liferay version. However, between different application servers there might be small variations. E.g. Jboss packages a lot more JAR files in the "global" classpath than Tomcat.- The JAR files are never loaded from temp. Maven imposes a problem indeed if you upgraded a dependency but didn't do a clean deploy. A clean deploy means, deleting the portlet/hook from the webapps folder of Tomcat before redeploying the WAR file. In our Liferay team, this is the standard procedure for deploying portlets and hooks. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Tom Wilbourn Il y a 10 années @Tom- The principles are not bound to a certain Liferay version. However, between different application servers there might be small variations. E.g. Jboss packages a lot more JAR files in the "global" classpath than Tomcat.- The JAR files are never loaded from temp. Maven imposes a problem indeed if you upgraded a dependency but didn't do a clean deploy. A clean deploy means, deleting the portlet/hook from the webapps folder of Tomcat before redeploying the WAR file. In our Liferay team, this is the standard procedure for deploying portlets and hooks. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Niccolò Pasquetto Il y a 9 années Wonderful article Peter, a really "basic" article. If I can afford a hint, in question number 2 I would repeat that poi.jar is included in ROOT/WEB-INF/lib. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
AYED Chekib Il y a 9 années Thank you for this article. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
cao wei Il y a 9 années HI Peter, Thanks for your nice article, but i'm confused when i share services among multiple portlets, in this case portlets seems can access other portlet's implementation class. This conflicts with your article that war can't see each other in liferay.Example:I have a Plugin common-service.war, in this plugin, i use liferay service builder to generate the service layer, and separate it into common-service.jar and common-service-impl.jar (those *impl.class)and i have another plugin myPortlet.war, i defines required-deployment-contexts=common-service and include common-service.jar in the myPortlet.war's library. This way, myPortlet can invoke the services provided by common-service.war. Please note that common-service-impl.jar is NOT included in the myPortlet.war.As two war files can't see each other during runtime, why myPortlet.war can invoke the service from common-service.war, the implementation class common-service-impl.jar is not available to myPortlet.war?I guess liferay uses some special class loading for this scenarios?Peter, any advice on this? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten cao wei Il y a 9 années Hi,Excellent question! Indeed, the servlet specification doesn't allow WAR files to see each other's classes. Therefore the classloader of portlet X would normally not be accessible for portlet Y.However, Liferay circumvents this by introducing classloader proxies (CLPs). So I guess you're right that Liferay performs some magic to make this work. For your reference, this link describes the principle more in depth: http://agile-reflections.opnworks.com/2012/04/sharing-classes-between-liferay-plugins.html Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten cao wei Il y a 9 années Hi,Excellent question! Indeed, the servlet specification doesn't allow WAR files to see each other's classes. Therefore the classloader of portlet X would normally not be accessible for portlet Y.However, Liferay circumvents this by introducing classloader proxies (CLPs). So I guess you're right that Liferay performs some magic to make this work. For your reference, this link describes the principle more in depth: http://agile-reflections.opnworks.com/2012/04/sharing-classes-between-liferay-plugins.html Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Arunjyoti Banik Il y a 9 années @Peter ........... I need a bit of info. I created a DefaultLandingPageAction.java through a hook plugin inside a package com.hook.test.path. I just took the sourcecode of this file and introduced two variables there so that they can be used in setting landing page path in portal-ext.properties. I also added these two properties::override.default.landing.page.path=true;login.events.post=com.liferay.portal.events.ChannelLoginPostAction,com.hook.test.path.DefaultLandingPageAction,com.liferay.portal.events.LoginPostAction.As usual I had the classloading problem, since my java file isnt in portal-impl.jar. I just want to know what else I have to do? And what is the use of overiding the path variable mentioned here:: https://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Customizing%20the%20default%20page%20after%20login. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Peter Mesotten Arunjyoti Banik Il y a 9 années @Arunjyoti,I'm not sure what you're trying to accomplish in your custom landing page action, but in 99% of the cases you can work around a dependency on classes from portal-impl.jar. Could you post (or PM) the code for your DefaultLandingPageAction, so I can take a look and see where internal references could be replaced by service-level references. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Arunjyoti Banik Peter Mesotten Il y a 9 années @Peter ........... I solved it. I had wrongly made my class under Struts Action. And with the code I modified, I can land into the group page, a user is assigned. Now I am working on which group page a user wants to land if he is assigned to multiple groups, based upon his choice. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Peter Mesotten Arunjyoti Banik Il y a 9 années @Arunjyoti,I'm not sure what you're trying to accomplish in your custom landing page action, but in 99% of the cases you can work around a dependency on classes from portal-impl.jar. Could you post (or PM) the code for your DefaultLandingPageAction, so I can take a look and see where internal references could be replaced by service-level references. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Arunjyoti Banik Peter Mesotten Il y a 9 années @Peter ........... I solved it. I had wrongly made my class under Struts Action. And with the code I modified, I can land into the group page, a user is assigned. Now I am working on which group page a user wants to land if he is assigned to multiple groups, based upon his choice. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Arunjyoti Banik Peter Mesotten Il y a 9 années @Peter ........... I solved it. I had wrongly made my class under Struts Action. And with the code I modified, I can land into the group page, a user is assigned. Now I am working on which group page a user wants to land if he is assigned to multiple groups, based upon his choice. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
arti gupta Il y a 9 années Great explanation !!!!!! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Vignesh Kumar Il y a 8 années For the first question answer->d Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Vignesh Kumar Vignesh Kumar Il y a 8 années Can anyone explain what will happen if put the jar file in both location tomcat/lib/ext and root/web-inf/lib.I am new to liferay.It will be much helpful for me if i understand this...Please Response quick Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Vignesh Kumar Vignesh Kumar Il y a 8 années Can anyone explain what will happen if put the jar file in both location tomcat/lib/ext and root/web-inf/lib.I am new to liferay.It will be much helpful for me if i understand this...Please Response quick Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
John Voltaire Maximo Il y a 8 années great! Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
(Vous) Il y a 8 années [...] Olá pessoal, tudo bem? eu estou com vários portlets que utilizam o hibernate, e ate então as lib's do hibernate estão dentro de cada portlet. Todos os portlets funcionam muito bem. O problema é o... [...] Read More Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
(Vous) Il y a 6 années [...] There is no shortcut. Don’t rely on any sample questions online(including this post) completely. Best way to prepare is to practice tutorial here . Even the experienced developers should try to go... [...] Read More Veuillez vous identifier pour voter. Répondre en tant que ... Annuler