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

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解决方法

解决方法如下:

在出现此错误的项目上单击鼠标右键》Build Path》Configure Build Path

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解决方法

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

此处点击Next后,如果里面是空选项,是因为还没有服务器配置!

按下图配置服务器即可。

如有选项,则忽略下图:

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解决方法

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解决方法

完美解决红叉:

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