您的位置:首页 > 移动开发

myeclipse中配置文件DTD/mapping问题

2017-01-22 15:07 302 查看


或者是struts   Spring的这种相似情况,都是由于myeclipse未进行配置DTD,mapping

解决方法:

手工添加dtd   mapping的支持
  在Myeclipse中菜单栏window->preference->Myeclipse->file and eiditor->xml->xml catalog->add

  1)Location:

  在struts(/hibernate)文件夹下的lib目录,找到struts2-core.jar文件并解压,打开解压的目录下即可找到struts2.3.dtd。这里location就选中该文件。找到hibernate3.jar解压,选中hibernate-configuration-3.0.dtd。mapping则是hibernate-mapping-3.0.dtd。
  2)Key Type:选中URI

  3)Key :

  在struts/hibernate/.xml中有

  <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD StrutsConfiguration 2.3//EN"

  "http://struts.apache.org/dtds/struts(/hibernate/spring)-2.3.dtd">

  复制其中的:http://struts.apache.org/dtds/struts-2.3.dtd
粘贴到key。


 
 打开你的配置文件hibernate.cfg.xml复制http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd
 [b]粘贴到key。
[/b]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐