以添加struts2的DTD文件为例,步骤如下:
1、window - preferences - xml catalog
2、add - location 选择 File System
3、Key Type 选择URI
4、Key 填入
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
步骤如下:
1:window --> preferencrs --> xml --> xml catalog --> add
2:location 选择 file system,然后选择你的本地dtd文件。
3:key type 选择uri。
4:key 填入下面用红色标注的值
"-//apache software foundation//dtd struts configuration 2.0//en"
"http struts.apache.org/dtds/struts-2.0.dtd">
5:保存之后,重启eclipse/myeclipse。