JavaWeb: 報錯信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
1、右擊web工程-》屬性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime -》Tomcat Server
2、切換到Java Build Path界面中的Orader and Export,選擇Tomcat。
注意:
按以上方法操作時,若打開Server Runtime后一片空白,需要設置Apache服務器。設置方法為:window->Preferences->Server->Runtime Environment -> add --> 選擇Apache的版本后點Next,再填入你apache服務器軟件的安裝(解壓后)地址。