报错: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
- Start tag of element <html>

翻译:

-超类"javax.servlet.http。在Java构建中没有找到HttpServlet路径
-元素的起始标签

原因:没有导入tomcat相关类导致的错误。
解决:添加tomcat。
右击web工程 - 属性 - Java构建路径 - 库 - Add Library - Server RunTime - Tomcat - 完成
参考:java错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu

原文地址:https://www.cnblogs.com/acuii/p/10411662.html