Javaweb error: The superclass“javax.servlet.http.HttpServlet” was not found on the Java Build Path

 

Error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

 

原因: 这是因为在Java build path 没有添加tomcat 运行时

解决方法:

右击web工程》属性或Build Path-Java Build Path->Libraries-> Add Libray…->Server Runtime –Tomcat Server

 

Leave a Comment