“The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

我新建的web程序,然后创建了一个jsp文件,然后jsp文件的第一行就出现红叉 
用鼠标点上去出现“The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”

e …… 不知道怎么说,后来就是先new 了一个server, 然后在项目属性->bulid path ->libaray中点添加lib-> server runtime ,将tomcat加进来就可以了。

记得要先new server ,不然如果直接加server runtime 就没的选。

原文地址:https://www.cnblogs.com/wangfantasy/p/3841707.html