When we use Eclipse for Java web development, this error may occur: The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path. How can we solve this problem?
Baidu experience: jingyan.baidu.com
Baidu experience: jingyan.baidu.com
method/step
-
The error we encountered is shown below:
-
We right-click the folder with the error message, as follows:
-
We click "Configure Build Path", as follows:
-
Let's click "Add Library" again, as follows:
-
We select the options marked in the above figure, and then click Next, as follows:
-
We then click "Finish", as follows:
-
We then click "Normal" to complete the setting. This way my errors go away like this: