I\'m using Eclipse and I need to be able to add Java libraries (JAR files) into my web application\'s WEB-INF/lib
folder. How do I achieve this?
add the jar to WEB-INF/lib from file structure refresh the project, you should see the jar now visible under the WEB-INF/lib folder.
this is the best solution that worked for me
As soon as you create a Dynamic Web project, follow these steps:
Right click on project -> Java EE Tools -> Generate Deployment Descriptor Stub
Eclipse will create a WEB-INF folder with web.xml and lib folder in it. Now you can just copy your jars to this lib folder and you will not get any build problems..
This will ensure all WEB-INF/lib jars are included on the classpath.
In case this helps anyone, if you are using a Git repo, make sure the jars make it into the WEB-INF/lib INSIDE the git repo and not just in the project WEB-INF/lib
They are automatically added to the project classpath if its a web project. Sometimes it does not work properly, a refresh or close/open of the project helps.
if its not a web project you can right click on the library and go to "Build Path" -> "Add to Build Path"
Add the jar file to your WEB-INF/lib folder. Right-click your project in Eclipse, and go to "Build Path > Configure Build Path" Add the "Web App Libraries" library This will ensure all WEB-INF/lib jars are included on the classpath. helped me..
Drag and drop in WEB-INF/lib folder and restart eclipse ans start webservice then create client