What is meant by Global Class Loader, Portal Class Loader?
Global class Loader : is tomcat/lib and tomcat/lib/ext folders jar files.
Portal class Loader : tomcat/webapps/root/web-inf/lib folder jar files
(ex: D:\workspace\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\lib)
Global class loader jars are available to all the portlet. Make sure when adding any jars in your portal class lader check whether it is exist in global class loader or not. Viceversa for Global class loader.
In this way you can avoid ClassCastException .
In Hook portlet --> If you override portal jsp , you can get portal and global class loaders. But you can't get jars loaded in this HOOK..
No comments:
Post a Comment