0.环境:
win7系统,Tomcat9配置无误。
1.错误:
项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path.
2.解决:
2.1.在Eclipse中,Window-->preference --> servers --> runtime --> environments --> 全部删除
2.2.Add-->Browse-->选择本地tomcat文件夹所在位置-->确定 --> finish-->OK
ps: Select the type of runtime environment 这一步请选择本机装Tomcat的对应版本
2.3.右键点击项目->build path->configure build path->add library->server runtime->apache tomcat
3. 解决!
4.补充
4.1 流程走完之后,若错误还在的话,请重启Eclipse