默认情况Myeclipse6.5 不支持struts2,所以加入struts.xml后也不会提示,下面就介绍下如何显示提示内容。

点击window->Preferences->MyEclipse Enterprise Workbench->Files nad Editors ->XML->XML Catalog,当然你也可以在Preferences中搜索XML,然后点击XML Catalog,点击Add,在Location中选struts2的dtd文件的路径,我的路径是:E:\java_tools\struts-2.2.3.1\src\core\src\main\resources\struts-2.1.7.dtd,如果没有源文件,可以解压缩struts2-core-2.2.3.1.jar,得到dtd文件,

KeyType选择:URI

Key中填写:http://struts.apache.org/dtds/struts-2.0.dtd

内容如下:

eclipse中增加对struts.xml配置的提示

点击OK,然后调整xml的默认打开方式为xml Editor,具体方法为:window->Preferences->General->Editors->File Associations,选中xml,然后选择Myeclipse XML Editor,然后点击右边default,显示如下图:

eclipse中增加对struts.xml配置的提示

 

然后点击“OK”。最后,将struts.xml重新打开即可。

转载于:https://blog.51cto.com/4728326/888315

相关文章:

  • 2021-08-26
  • 2021-04-07
  • 2021-10-23
  • 2021-05-07
  • 2022-12-23
  • 2022-01-02
  • 2021-08-02
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2021-04-03
  • 2021-07-20
  • 2021-10-25
  • 2021-09-06
相关资源
相似解决方案