解决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
    解决eclipse中web.xml报错Multiple annotations found at this line的问题

  2. 选择已经下载到本地的.xsd文件路径(ctrl+鼠标左键点击web.xml中的.xsd链接即可下载相应的.xsd文件到本地目录)
    解决eclipse中web.xml报错Multiple annotations found at this line的问题

  3. 在web.xml中加入id=上图中设置的key值
    解决eclipse中web.xml报错Multiple annotations found at this line的问题

  4. 右键点击web.xml -> validate