当我们在编写struts.xml时,发现eclipse并不会给出帮助提示,那是因为MyEclipse默认并不支持struts2,所以我们需要手工导入dtd以支持提示。步骤:[window][preferences][MyEclipse][Files and Editors][XML][xml Catelog]然后在右边点add添加:location为dtd文件所在的位置(struts-2.0.dtd文件struts2-core-2.1.6.jar中可以得到),KeyType选择URI,Key为struts-2.0.dtd文件中文档声明的内容(http://struts.apache.org/dtds/struts-2.0.dtd),在struts.xml文件中也有此key值
让MyEclipse提示xml信息
最新推荐文章于 2018-02-15 12:48:58 发布