是因为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

 

相关文章:

  • 2021-07-07
  • 2021-05-21
  • 2021-11-14
  • 2021-07-19
  • 2021-06-26
  • 2021-04-05
  • 2021-04-15
猜你喜欢
  • 2021-05-08
  • 2021-08-02
  • 2021-10-06
  • 2021-12-12
  • 2021-08-18
相关资源
相似解决方案