手动下载dtd文件并配置到myeclipse中

来源:互联网 发布:郑州易亚网络 编辑:程序博客网 时间:2024/05/21 22:35

在myEclipse里面配置struts2.xml的是后老是出现<?xml version="1.0" encoding="UTF-8" ?>报错,而且写标签的时候没有提示,后来发现时myeclipse里面没有引入http://struts.apache.org/dtds/struts-2.0.dtd,在网上找了好久终于找到引入dtd的方法:

在eclipse中 struts2配制文件中不支持提示,这时需要手工添加dtd的支持

Preferences -> MyEclipse Blue Edition -> Files and Editors -> XML -> XML Catalog -> Add

1)Location中找到struts2.0.dtd的地址
2)Key Type中选中URI
3)Key : 在struts.xml中找到dtd的地址:http://struts.apache.org/dtds/struts-2.0.dtd

原创粉丝点击