在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啦