4
votes

I am using some third-party jar files in my liferay portal. These jar files will be used from multiple portlets in my portal.

I know that I can put my jar file inside my-portlet/WEB-INF/lib. But the problem here is it will accessible only inside that portlet. I want the jar file to be available to all portlets in my portal. How can i do this? Is there any global library where i can deploy my jar file and it can be accessed from anywhere?

Also, how to deploy this third-party jar file to production instance?

1

1 Answers

8
votes

You can do it by two ways (for Tomcat distribution):

  1. Manualy copy your *.jar to tomcat/lib/ext directory and restart Liferay
  2. Write Liferay extension and put *.jar files to docroot/WEB-INF/ext-lib/global and deploy it before Liferay start. It's more preferable way that independent from Web server.

Vim