eclipse web工程在沒有引入tomcat相應(yīng)運行時環(huán)境的時候泪勒,會出現(xiàn)The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的錯誤,如下圖所示:
解決辦法如下:
第一步:配置server runtime
第二步:在出現(xiàn)此錯誤的項目上單擊鼠標右鍵》Build Path》Configure Build Path
選擇剛創(chuàng)建的runtime server即可