struts.xml中标签自动提示问题

myeclipse不提示struts2标签,是因为myeclipse没有融合struts2,可以自己手动添加dtd让它提示,操作:

window->preferences->MyEclipse->Files and Editors->XML->XML Catalog 
点开这个XML Catalog选中第一个User Sepecified Entries 点Add按钮 
弹出一个窗口,在Location里面选择File System,添加struts2的DTD文件目录, 
key Type选择URI,
Key 添加struts2中的DTD的头信息中的URL,即http://struts.apache.org/dtds/struts-2.0.dtd
这样就会提示了。


把struts.xml的打开方式改为MyEclipse XML Editor

原文地址:https://www.cnblogs.com/zongzhankui/p/5875342.html