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.