相信很大家在敲xml配置文件是总想让ide给出提示,但myeclipse需要自己动手配置才能实现,具体步骤如下:
准备工作:
将jar包struts2-core-2.3.16.3.jar解压,用notepad++(或类似记事本工具)打开struts-2.3.dtd文件备用
1.打开myeclipse,选中wiondows–>prefreence
2.在搜索栏中输入关键字xml 选中xml catalog
3.点击右边的add按钮
4.左边栏选中catalog entry 右边点击file system,选择之前解压的jar包中struts-2.3.dtd(对应xml配置文件开头部分的声明)文件
5.在key type下拉菜单选择uri,并在key中输入struts-2.3.dtd文件的uri(uri通过打开文件,找到 “-//Apache Software Foundation//DTD Struts Configuration 2.3//EN”
“http://struts.apache.org/dtds/struts-2.3.dtd”>,其中”http://struts.apache.org/dtds/struts-2.3.dtd“就是一个uri,其并不是网址,只是写法与网址类似)
6.点ok,ok就成了