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 -->Java Build Path-->Libraries-->Add Libraries-->Server Runtime-->选择自己的Tomcat -->OK

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

再选择Order and Export,勾选上Tomcat,OK

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

如果还提示报错,将页面代码全选,再Ctrl+X剪切再粘贴一下即可

  • 感谢您的阅读。如果感觉文章对您有用,麻烦您动动手指点个赞,以资鼓励。谢谢!