1, Tomcat application Server, it has its own class loader, according to the specifications of the Java EE to%web-project%/web-inf/lib path to find the corresponding Lib jar file
2. When using the eclipse Java EE IDE, all lib in Web-inf/lib will be automatically added to the library
3, the Eclipse Project library is used to compile the Java file inside the SRC, when actually published to Tomcat, only copied the web-inf/lib inside the jar package, so the eclipse can be compiled normally but Tomcat run cannot find the class
4, you now use Tomcat to do the server, then need to rely on the jar package should be tested in Web-inf/lib, Tomcat will automatically compile it and then put into the Web-inf/classes directory (of course, your SRC code will be put here after the compilation), should do so, It's a rule.
The WEB project is developed in Eclipse for Java EE, and the jar package must be placed under the/web-inf/lib folder