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.
In the future you should always create a copy of your depencies in the web-inf/lib folder.
When they are there just right click them and select “Build Path -> Add to Build Path”.
For your current project I would disable all current external jars that live outside of that folder and then copy them into it.