我们在用Eclipse进行Java web开发时,可能会出现这样的错误: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 Bu

我们右击有错误提示的文件夹,如下:

我们点击”配置构建路径“,如下:

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

 

 

我们再点击”添加库“,如下:

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

我们选中上图中标出的选项,再点击下一步,如下:

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

我们再点击”完成“,如下:

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

我们再点击”正常“,即可完成设置。这样我的错误就会消失了,

相关文章:

  • 2021-11-08
  • 2021-10-08
  • 2022-01-06
  • 2021-10-04
猜你喜欢
  • 2021-09-18
  • 2021-04-13
  • 2022-12-23
  • 2021-05-13
相关资源
相似解决方案