在 Eclipse 中这个 XML 文件有什么问题?

发布于 2025-01-09 05:29:23 字数 650 浏览 0 评论 0原文

我对 XML 不太了解,我正在 Eclipse 中为基于 Java 的应用程序修复一些代码。我在这里收到错误:

代码正文中的错误

标记为错误的文本:"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"

我还在 XML 文件中收到这些错误:

其他 xml 错误描述

我会包含整个代码主体,但它是为了工作,所以我对共享大部分内容都有点谨慎。如果有人发现任何明显的错误,我将不胜感激。我还应该补充一点,这个 XML 文件不是我编写的。这就是我收到代码时已经写的。

另外,我对向 stackoverflow 发帖还很陌生,所以如果这篇文章很糟糕,我也可以对此提出一些建议(笑)

I don't know much about XML and I am fixing up some code for a Java based application in Eclipse. I'm getting errors here:

Error in code body

Text marked as an error: "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"

I'm also receiving these errors in the XML file:

Other xml error descriptions

I would include the entire body of code but it's for work so I'm a bit wary of sharing much of anything. If anyone recognizes any glaring errors, I'd appreciate it. I should add too, that I didn't write this XML file. This is just how it was already written when I received the code.

Also I'm very new at posting to stackoverflow so if this post is just horrible I could take some pointers on that too (lol)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

诠释孤独 2025-01-16 05:29:23

引用的 DTD 文件 http://java.sun.com/j2ee /dtds/web-app_2_3.dtd不是一个DTD文件,而是一个文本文件,内容如下:

The file named http://java.sun.com/j2ee/dtds/web-app_2_3.dtd
has been renamed to http://java.sun.com/dtd/web-app_2_3.dtd
in the most current version of the specification.
Please update your application to use the new name.

所以解决方案是替换http://java.sun.com/j2ee/dtds/web-app_2_3.dtdhttp://java.sun.com/dtd/web-app_2_3.dtd >。

The referenced DTD file http://java.sun.com/j2ee/dtds/web-app_2_3.dtd is not a DTD file, but a text file with the following content:

The file named http://java.sun.com/j2ee/dtds/web-app_2_3.dtd
has been renamed to http://java.sun.com/dtd/web-app_2_3.dtd
in the most current version of the specification.
Please update your application to use the new name.

So the solution is to replace http://java.sun.com/j2ee/dtds/web-app_2_3.dtd with http://java.sun.com/dtd/web-app_2_3.dtd.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文