1.打開window-preferences-myeclipse enterprise workbench-files and editors-xml-xml catalog,
點 add..,出現一對話框,location欄選file system,找到struts-2.0.14-all\struts-2.0.14\src\core\src\main\resources目錄下的 struts-2.0.dtd文件,打開,然後key type 選擇uri,下面key值填 http://struts.apache.org/dtds/struts-2.0.dtd,點擊OK,這樣再次打開struts.xml時應該就有提示了。
2.當你輸入元素後,如果沒有屬性提示,比如輸入<action name="" ></action>,不能再繼續提示action中的屬性的話,需要做如下修改:
打開window-preferences-general-keys,在右邊找到content Assist這一欄,如果這一欄中binding下面有值,點擊remove binding,然後在下面的binding欄,選擇另一個快捷鍵,比如‘alt+,’,點擊OK。
重新打開struts.xml文件,需要屬性提示時,按所設置的快捷鍵,就會出現屬性提示。
如果還是沒有用的話 :
可能是源文件路徑裏有中文,改成英文就OK了!