Referenced file contains errors (http://struts.apache.org/dtds/struts-2.0.dtd)

来源:互联网 发布:美国西储大学轴承数据 编辑:程序博客网 时间:2024/06/08 05:35

1,导入Eclipse的web项目出错,
则新建一个项目,分别将src和webContent下的内容进行拷贝,即可。

2,J2EE Struts 中的struts.xml出错

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts PUBLIC     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"    "http://struts.apache.org/dtds/struts-2.0.dtd">

解决办法:
Eclipse中,Windows->preferences->XML->XMLCatalog->Add->
这里写图片描述
Location: 填写struts-2.0.dtd所在的路径
Key type: Public ID
Key: -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
点击OK,选中项目,F5刷新,就可以了。

0 0
原创粉丝点击