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

新建web项目后,并没有出现默认的index.jsp,我就新建了一个jsp页面,出现jsp页面开头报错的情况。

 

解决方案步骤:

1.选中项目右击鼠标,找到Build Path,选中config buildpath

2.在弹出的对话框 Libraries 选择框下,单击右边栏的Add Labrary

3.选中 Server Runtime --》 next

4.选择配置过的http服务器,如tomcat

5.最后点击finish,ok项目刷新后,jsp的红色波浪线不见了,说明这个错误解决了。

配完是这样的。

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