1. 程式人生 > 實用技巧 >解決eclipse中web.xml報錯Multiple annotations found at this line的問題

解決eclipse中web.xml報錯Multiple annotations found at this line的問題

解決eclipse中web.xml報錯Multiple annotations found at this line的問題

  1. window -> preferences -> XML -> XML Catalog -> User Specified Entries -> Add
    在這裡插入圖片描述

  2. 選擇已經下載到本地的.xsd檔案路徑(ctrl+滑鼠左鍵點選web.xml中的.xsd連結即可下載相應的.xsd檔案到本地目錄)
    在這裡插入圖片描述

  3. 在web.xml中加入id=上圖中設定的key值
    在這裡插入圖片描述

  4. 右鍵點選web.xml -> validate