When we develop a web app with Eclipse, we import many third-party jar packages. There is no problem with code compilation, but when you start the server with eclipse, you find that many classes are missing. It is possible that these third-party jar packages, although in BuildPath, were not automatically copied to Tomcat when the project was deployed. We can modify the. classpath file under the project so that eclipse automatically puts the jar package into the Web-info Lib folder, as follows:
<classpathentry kind= "Con" path= "org.eclipse.jdt.user_library/mylib" > <attributes> <attribute N Ame= "Org.eclipse.jst.component.dependency" value= "/web-inf/lib"/> </attributes> <classpathentry/>
The <attributes> tab section is the configuration that lets eclipse automatically copy, and value is the destination folder.
This article is from the "Bronze Gong" blog, please be sure to keep this source http://jaeger.blog.51cto.com/11064196/1758159
Let eclipse automatically import Lib to Tomcat