eclipse中配置DTD文件,使书写struts.xml拥有代码提示

 首先准备好必要的DTD文件 :struts-2.3.dtd

文件下载路径:https://download.csdn.net/download/qq_29519041/10679698

window下的Preferences

eclipse中配置DTD文件,使书写struts.xml拥有代码提示_第1张图片

 输入xml为了搜索XML Catalog,点击它,然后点击Add

eclipse中配置DTD文件,使书写struts.xml拥有代码提示_第2张图片

 如下图1,选择你的文件系统,找到你存放struts-2.3.dtd的位置

2.key中输入红色字体-->  -//Apache Software Foundation//DTD Struts Configuration 2.3//EN

3.备选网络地址输入:   http://struts.apache.org/dtds/struts-2.3.dtd

eclipse中配置DTD文件,使书写struts.xml拥有代码提示_第3张图片

 都输入后点击ok

并点击apply and close 应用并关闭

再书写Struts.xml文件时就有代码提示了。

你可能感兴趣的:(Java,Eclipse相关)