struts 配置文件dtd问题

来源:互联网 发布:人工智能发展简史 编辑:程序博客网 时间:2024/06/06 07:47

在Eclipse中因配置文件出现问题文本项目不能正常运行:

配置文件错误信息:The errors below were detected when validating the file "struts-2.3.dtd" via the file "struts.xml".  In most cases these errors can be detected by validating "struts-2.3.dtd" directly.  However it is possible that errors will only occur when struts-2.3.dtd is validated in the context of struts.xml.


谷歌翻译:在通过文件“struts.xml”验证文件“struts-2.3.dtd”时检测到以下错误。 在大多数情况下,可以通过直接验证“struts-2.3.dtd”来检测这些错误。 但是,可能只有在struts.xml的上下文中验证struts-2.3.dtd时才会发生错误。


解决方法:

第一步:在Eclipse中window->preference->xml->xmlcatalog->add;

第二步:location:此处添加的文件应是struts-core解压后的struts-2.3.dtd。

第三步:key:此处添加url:http://struts.apache.org/dtds/struts-2.3.dtd。

点击确定就OK啦
0 0
原创粉丝点击