在动态 Web 应用 Eclipse 中下载 web-app_4_0.xsd 时出错

问题描述

当我尝试在 Eclipse 中制作 Maven 动态 Web 项目时发生此错误

将“http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd”下载到 C:\Users\akalanka.lemminx\cache\http\xmlns.jcp.org\xml 时出错\ns\javaee\web-app_4_0.xsd.

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    id="WebApp_ID" version="4.0">

解决方法

我的 Eclipse 中的每个 XML 文件都有同样的问题。就我而言,这是导致我使用企业代理和“旧”版本的 Eclipse(2019)。这在我的所有项目文件夹中都出现了很多红十字错误,但这并不能避免它起作用。我认为您可以通过在较新版本中配置“网络连接”来修复它。