[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: How to make Eclipse put jars into WEB-INF/lib?

David Karr wrote:
Eclipse 3.3.2.

It seems like I've battled with this before, but it escapes me now.

I have a dynamic web project that I've assembled from an existing WAR. I'm trying to figure out how to get the required jars for the project to actually deploy into WEB-INF/lib when the WAR is constructed. The project has no errors in Eclipse, but when I export the WAR, the WEB-INF/lib directory is empty.

In the Eclipse project, I have a "lib" subdirectory that contains all the jars, and I've put all of those jars into the build path.

I've tried to use the "J2EE Module Dependencies" page, because I thought this controlled what goes into WEB-INF/lib. In that dialog, I selected all the jars for this project and clicked OK. When I then go back into this dialog, all of those jars are unselected again.

When I export the project to a WAR file, it leaves the WEB-INF/lib directory empty.

I tried to deploy the project to Tomcat 6.0.14, but the context root is never available (gets 404). I see no deployment errors in the Tomcat console.

hi,David

when you import a project in J2EE Module Dependencies, it will only import compiled source in Dependencies project and without the jars in that project, in common, it's not need a folder to add the jars, you can copy the jars to WEB-INF/lib, eclipse will add them to classpath automatically when you export it to war package.