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

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

在WEB-INF目录下创建index.jsp
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
代码出现错误
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
1、在出现此错误的项目上单击鼠标右键>Build Path>Configure Build Path…
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
2、java Build Path>Libraries>Add Variable…>Next
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
3、Server Runtime>NextThe superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
4、添加"Apache Tomcat v8.0">FinishThe superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
5、Order and Export>选择 “Web… EAR Apache Tomcat v8.0 ”打勾>Apply and CloseThe superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
6、完成The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path


亦或是没添加Tomcat8