轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/wu_wxc/article/details/51836297 本文出自【吳孝城的CSDN博客】
Eclipse創(chuàng)建jsp后報(bào)錯(cuò)Multiple annotations found at this line:- The superclass “javax.servlet.http.HttpServlet” was not found on the JavaBuild Path- The superclass “javax.servlet.http.HttpServlet” was not found on the JavaBuild Path
這里寫(xiě)圖片描述
是因?yàn)槿鄙賡ervlet-api.jar右擊項(xiàng)目文件笙纤,選擇Build Path–>Configure Build Path…–>Libraries如果沒(méi)有Apache Tomcat耗溜,就點(diǎn)擊Add Library–>Server Runtime–>Next–>選擇Apache–>Finish褪测,刷新項(xiàng)目看看錯(cuò)誤是否消失惧辈。
如果有Apache Tomcat就點(diǎn)擊Add Library…–>User Library–>Next–>User Libraries–>New…–>名字隨便寫(xiě)–>ok–>Add External JARs…–>找到你Apache安裝路徑下的lib目錄,選擇servlet-api.jar–打開(kāi)–>ok–>Finish–>ok缘缚,好了腥椒,問(wèn)題解決這里寫(xiě)圖片描述