gpt4 book ai didi

java - 引用的文件包含错误 (http ://java. sun.com/xml/ns/javaee/web-app.xsd)

转载 作者:行者123 更新时间:2023-11-30 08:44:22 25 4
gpt4 key购买 nike

我在 Eclipse 中遇到了这个错误:

Referenced file contains errors (http://java.sun.com/xml/ns/javaee/web-app.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

谁能帮帮我?什么是问题?提前致谢。我的代码是:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee;http://java.sun.com/xml/ns/javaee/web-app.xsd">

<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>

<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- Processes application requests -->
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/dispatcherServlet/servlet-context.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

</web-app>

最佳答案

尝试将此 URL 用于模式定义:

http://oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_3_0.xsd

正如@Renardo 上面提到的,以下 URL...

http://java.sun.com/xml/ns/javaee;http://java.sun.com/xml/ns/javaee/web-app.xsd 

...重定向到在 Eclipse 中导致错误的 HTML 页面。

关于java - 引用的文件包含错误 (http ://java. sun.com/xml/ns/javaee/web-app.xsd),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33796485/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com