在myeclipse中点击window->preferences->myeclipseenterpriseworkbench->xml->XMLCatalog.

点击add然后出来对话框

将struts2-core-2.1.8.1.jar文件解压,可以看到struts-2.1.7.dtd文件。

在Location中选择dtd文件,

我的选择是:D:\javalib\struts2.x\struts-2.1.8.1\lib\struts2-core-2.1.8.1\struts-2.0.dtd

KeyType:URI

Key:http://struts.apache.org/dtds/struts-2.0.dtd

然后点击ok就行了!