引用的文件包含错误 (jar:file:/C:/Program Files/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.500.v202302261818.jar!/dtdsAndSchemas/jakartaee_10.xsd) 是运行时抛出的错误我的 servlet 程序的部署描述符。
这是问题部分的描述: 通过文件“web.xml”验证文件“jakartaee_10.xsd”时检测到错误。在大多数情况下,可以通过直接验证“jakartaee_10.xsd”来检测这些错误。但是,只有在 web.xml 的上下文中验证 jakartaee_10.xsd 时,才有可能出现错误。
这是我自动生成的 web.xml 代码
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://jakarta.ee/xml/ns/jakartaee" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" id="WebApp_ID" version="6.0">
<display-name>JSP_A_I</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.jsp</welcome-file>
<welcome-file>default.htm</welcome-file>
</welcome-file-list>
</web-app>
预计此错误可能会得到修复。
请找到我发布到上面 BalusC 提到的类似问题的解决方案:https://stackoverflow.com/a/78053918/2467349.