The following content is transferred from: http://kusix.iteye.com/blog/919887
Veteran and myeclipse users can ignore this article automaticallyArticle
Many people will find that, although the referenced jar package is set in buildpath, during the deployment of WTP, the jar package is not copied to the WEB-INF/lib. Many people directly copy all jar packages to this directory. I have seen many veterans do the same, but this is not conducive to dependency package management, if the number is small, the version of the dependent package may be chaotic when the number is large (for example, the number of jar packages that my current project depends on is 178.
Here is a solution to this problem.
Generally, our project directory structure is as follows:
Enter buildpath and select Add userlib to create userlib. For example, seal common as a lib
Open the. classpath file under the root directory of the project, edit it, and add a dependency attribute to common.
< Classpathentry Kind = "Con" Path = "Org. Eclipse. jdt. user_library/common" > < Attributes > < Attribute Name = "Org. Eclipse. JST. component. Dependency" Value = "/WEB-INF/lib" /> </ Attributes > </ Classpathentry >
Save, refresh the project, and redeploy the project. You will find that the jar packages managed by these specifications have been deployed under tomcat.