Multiple annotations found at this line:
- String cannot be resolved to a type
- The method getContextPath() from the type HttpServletRequest refers to the missing type String
解決辦法:
首先 右擊該項目 - Build Path - Configure Build Path , 在 Libraries 選項下,會發現有個出錯的jre Libraries,將其Remove掉。
然后 右擊該項目 - Build Path - Add Library, 選擇JRE System Library,選擇Workspace defaulr JRE(jdk1.6)(此前JDK已成功安裝並配置好), 然后 Finish 。