美文网首页
struts2配置错误

struts2配置错误

作者: 橙子潘潘 | 来源:发表于2017-05-18 10:50 被阅读0次
    <?xml version="1.0" encoding="UTF-8"?>```出现红色叉叉。
    >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.
    
    >Description:the markup declarations contained or pointed to by the document type declara
    
    解决了,原因是机器没上网,找不到指定的dtd文件!
    可以这样做:在eclipse的菜单栏window中单击preference,依次找到XML-DTD Files,选择XML Catalog,选中右上方的User Specified Entries,单击add按钮,找到该dtd文件在本地的路径:
    struts-2.1.8\src\core\src\main\resources\struts-2.3.dtd,Key Type 中选择uri,key中输入以下路径:http://struts.apache.org/dtds/struts-2.3.dtd,点击确定。回到struts.xml后在任意位置输入空格保存就行了

    相关文章

      网友评论

          本文标题:struts2配置错误

          本文链接:https://www.haomeiwen.com/subject/xnqsxxtx.html