在 Eclipse 中这个 XML 文件有什么问题?
我对 XML 不太了解,我正在 Eclipse 中为基于 Java 的应用程序修复一些代码。我在这里收到错误:
标记为错误的文本:"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"
我还在 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:
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:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
引用的 DTD 文件
http://java.sun.com/j2ee /dtds/web-app_2_3.dtd
不是一个DTD文件,而是一个文本文件,内容如下:所以解决方案是替换
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd
与http://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:So the solution is to replace
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd
withhttp://java.sun.com/dtd/web-app_2_3.dtd
.