Now that i've been doing some research I understand that I need to be placing my dependent external jars in the web-inf/lib folder for a dynamic web project in eclipse. Unfortunately until now I have simply been importing them in on the build path within eclipse and then again in the runtime config for my testing server.
Is there a simple way to copy all of the dependent jars to the web-inf/lib folder upon export or do I have to manually find each one, and place it in the folder? Is there a better way to manage external jars during development so I don't have to be concerned with importing them to the build path, and then the runtime, and then the library folder? I've tried using Project >> Properties >> Java Build Path >> Order and Export and checking all the jars, but they still don't seem to export with the war.
I am using tomcat as my production server and figured all of this out when I couldn't start the project due to defclassnotfounderror's in the log file.
Right Click on the project -> properties. On properties window
Right Click on the project -> export. Select Web -> .war file.
You will find the libraries under /WEB-INF/lib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With