编写struts.xml文件时提示帮助信息

来源:互联网 发布:sql 注入 php 提权 编辑:程序博客网 时间:2024/05/19 07:10


让MyEclipse提示xml信息:


当我们在编写struts.xml时,发现MyEclipse并不会给出帮助提示,那是因为MyEclipse默认并不支持struts2的DTD约束,所以我们需要手工导入dtd以支持提示。




步骤:[window][preferences][MyEclipse][Files and Editors][XML][xml Catelog]


然后在右边点add添加:


location为dtd文件所在的位置(struts-2.3.dtd文件struts2-core-2.3.20.jar中可以得到),


KeyType选择URI,Key为struts-2.3.dtd文件中文档声明的内容(http://struts.apache.org/dtds/struts-2.3.dtd),


在struts.xml文件中也有此key值。


使用alt+/提示。

0 0
原创粉丝点击