referenced file contains errors http struts.apache.org dtds struts-2.0...

来源:互联网 发布:国际 社会统计 数据库 编辑:程序博客网 时间:2024/05/18 04:54

解决方法(两种):

     1. 这个可能是你的DTD文件找不到,或者解析有错,才发生的错误.你可以在地址栏里输入http://struts.apache.org/dtds/struts-2.0 .dtd 这个看能查看不,如果不能,应该是网络的问题或XML解析的问题,解决的方法就是你把DTD文件(struts2-core-2.1.6.jar里面)拷贝到你的CLASSPATH目录下,把http://struts.apache.org/dtds/struts-2.0 .dtd 这个路径换成"/WEB-INF/classes/struts-2.0 .dtd "这样再试一下

     2. 从struts2-core-2.x.x.jar中取出struts-2.0.dtd,打开[Window]-[Properties],打开对话框.在左边的树形列表中选择[MyEclipse]-[Files-Editors]-[XML]-[XML Catalog],此时右边显示相应的内容.在右边[XML Catalog Entries]下方有一个[Add]按钮,单击它,在弹出的对话框中输入:
          Location:UseStruts2/src/struts 2.0.dtd(这个选择你刚取出来的 struts-2.0.dtd文件)
          Key Type:Public ID
          Key:-//Apache Software Foundation//DTD Struts Configuration 2.0//EN
选择[OK]即可添加.

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/st780206/archive/2009/07/16/4353597.aspx

原创粉丝点击