Add library to CAF portlet application

Hi guys,
I’m writing a CAf action to create an EXCEL file and export that file.
I’m using the Apache POI library and no error is found during compilation.

I’ve added the library to the build path but when the portlet is deployed (MWS or preview server) the action does not work and the library is not in the path anaymore…

Where do I need to add the library ?

Am I doing it the right way?

Thank you very much everybody!

Hi Fabrizio,
Have you added the jar to the WEB-INF\lib folder of your project or just on the eclipse build path?
In the first case your external library should be deployed to the server ( if you are using MWS you can check the %SAG_HOME%\MWS\server\default\deploy\yourapp to make sure of it) and it should work.
In the second case eclipse will use the library to compile the project but the jar will not be deployed to the remote server therefore it will fail at runtime

There might be another option which is put the jar in the server lib folder so all the webapps will see it but in my opinion this is a project specific jar and it should go to the WEB-INF\lib.