您的位置:首页 > 编程语言 > Java开发

eclipse或myeclipse开发是没有xml提示怎么办???

2012-11-11 10:11 323 查看
如果是myeclipse,windwos->preferences->myeclipse->files and editors->xml->xmlcatalog->点“add”,在出现的窗口中的location中选“File system”,然后在struts-2.0解压目录的src\core\src\main\resources目录中选择struts-2.0.dtd,例如D:\java\struts-2.1.8.1\src\core\src\main\resources\struts-2.0.dtd,回到设置窗口的时候不要急着关闭窗口,应把窗口中的Key
Type改为URI,Key改为http://struts.apache.org/dtds/struts-2.0.dtd--就是struts.xml文件里开头部分声明的那个地址。



如果是eclipse,则是windwos->preferences->xml->xmlcatalog

案例1(用public id)

Location E:\Java\dtd\hibernate-mapping-3.0.dtd

Key type Putlic ID

Key -//Hibernate/Hibernate Mapping DTD 3.0//EN

案例2(用uri)

Location E:\Java\dtd\hibernate-configuration-3.0.dtd

Key type URI

Key http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: