1. 程式人生 > >struts2的struts.xml文件的提示功能配置

struts2的struts.xml文件的提示功能配置

http catalog open color edit 2.3 kdt tps ren

1.先配置dtd文件

步驟:

1.首先打開MyEclipse的窗口,選擇“Window”菜單下的“Preferences”選項

2、再打開的“Preferences”對話框中,選擇左邊的“XML”選項下的“XML Catalog”選項,然後選擇右邊的“Add”按鈕,

3.選擇“File System”按鈕,找到dtd文件的位置,(可以解壓struts-core-2.5.13.jar包得到)(也可以struts-2.5.13\src\core\src\main\resources)

4.接下來在“Key type”的地方選擇類型為“URI”,在“Key”的地方輸入“E:\struts-2.3.4.1\src\core\src\main\resources\struts-2.3.dtd”,這句話可以上該dtd文件DOCTYPE中找到。點擊ok保存就行了。

一般情況這樣就可以了,如果還是不行,就進行如下操作:

2.重新打開struts.xml

點擊struts2.xml右鍵,選擇右鍵菜單中的Open With--》Myeclipse XML Editor,改為xml編輯器,就可以了。

struts2的struts.xml文件的提示功能配置