This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Servlet Jar Includes in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Servlet Jar Includes in Eclipse" Watch "Servlet Jar Includes in Eclipse" New topic
Author

Servlet Jar Includes in Eclipse

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I'm coding a Hibernate Servlet. Now I added the jars to a Hibernate user library and then added that to the project, so everything compiles. However, when I run it in Eclipse using the built in Tomcat launcher, the servlet can't find the Hibernate jars. I need to copy the jars into the lib dir for Tomcat.

Is there a way to automate this? That way I don't have to worry about duplicating the different jars? And then the ide can help manage duplicate classes in different jars as well.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16395
    
  23

Eclipse isn't a web application server. To make a library (jar) accessible when running a web server (such as Tomcat under Eclipse control), you have to include the library in the WEB-INF/lib directory of the WAR that the server is running.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Servlet Jar Includes in Eclipse