[IDE - Eclipse] JSP报错:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

时间:2022-02-09 17:09:53

是因为Eclipse的Web项目不自动引入相关jar包.

Right Click on the Project ❯ Properties ❯ Project Facets. You would be presented with the screen that would look similar to the following screen. On the right hand side, you would see two tabs: Details and Runtimes. Click Runtimes tab ❯ Check the Apache tomcat server ❯ Apply ❯ Ok
[IDE - Eclipse] JSP报错:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

That’s it. This would solve the error.

Caution:tomcat/jdk的版本兼容问题.

[IDE - Eclipse] JSP报错:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path