Reputation: 273552
I have a java web project in eclipse and want to define a tomcat server. It seems that in the tomcat server I must define again my classpath. How can I tell tomcat to just use the classpath from my project (shouldn't this be obvious?).
Unfortunately my jars are scattered all around and it is an headache to add them one by one to my tomcat configuration and maintain this.
Upvotes: 0
Views: 9064
Reputation: 9868
You don't have to tell tomcat to look for jars scattered all around the places. This can be easily taken care by eclipse. Configure your eclipse build path properly. Create Libraries (in eclipse) and group jar together. Try to export the war and check if eclipse is packaging all the required jars in WEB-INF/lib.
Upvotes: 1
Reputation: 308763
No, Tomcat and web apps have a pretty well-defined CLASSPATH. You shouldn't have to specify anything if you package your app properly:
You should figure out how to put your JARs in the right place - that's WEB-INF/lib of your WAR file. Maybe Ant or Maven can help you.
Upvotes: 0