Solve the problem that the web app libraries in the eclipse environment variable does not have a jar package.

Source: Internet
Author: User

Today, I am calling a project for my colleagues, which is full of class compilation errors. At first glance, the corresponding jar package is not introduced. Open build path-> Configure build path, it is found that there is no jar package in the web app libraries. It should be included in the web app LibrariesProject directory \ webcontent \ WEB-INF \ LibSo I checked the Directory and found that the package directory of this project is as follows:Project directory \ SRC \ main \ sample \ WEB-INF \ LibThe problem is clearly located here. After searching for half a day, I couldn't find where to configure this path. FinallyOrg. Eclipse. WST. Common. Component in the. settings folder of the project directoryThe related configuration is found. The original configuration is as follows:

<? XML version = "1.0" encoding = "UTF-8"?>
<Project-modules id = "modulecoreid" Project-version = "1.5.0">
<WB-module deploy-name = "test">
<WB-resource deploy-Path = "/" Source-Path = "/webcontent"/>
<WB-resource deploy-Path = "/WEB-INF/classes" Source-Path = "/src"/>
<Property name = "context-root" value = "test"/>
<Property name = "Java-output-path" value = "build/classes"/>
</WB-module>
</Project-modules>

Changed:

<? XML version = "1.0" encoding = "UTF-8"?>
<Project-modules id = "modulecoreid" Project-version = "1.5.0">
<WB-module deploy-name = "test">
<WB-resource deploy-Path = "/" Source-Path = "/src/main/sample/"/>
<WB-resource deploy-Path = "/WEB-INF/classes" Source-Path = "/src"/>
<Property name = "context-root" value = "test"/>
<Property name = "Java-output-path" value = "build/classes"/>
</WB-module>
</Project-modules>

Refresh the project in eclipse to solve the problem.

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.