The WEB project is developed in Eclipse for Java EE, and the jar package must be placed under the/web-inf/lib folder

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.