Error: HttpServlet was not found on the Java

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

Tools/Materials

 
  • computer
  • Java web development environment

Baidu experience: jingyan.baidu.com

method/step

 
  1. 1

    The error we encountered is shown below:

  2. 2

    We right-click the folder with the error message, as follows:

  3. 3

    We click "Configure Build Path", as follows:

  4. 4

    Let's click "Add Library" again, as follows:

  5. 5

    We select the options marked in the above figure, and then click Next, as follows:

  6. 6

    We then click "Finish", as follows:

  7. 7

    We then click "Normal" to complete the setting. This way my errors go away like this:

    Error: HttpServlet was not found on the Java

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326226174&siteId=291194637
Recommended