我们在用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 Build Path 报错解决!

解决办法:我们右击项目Build Path—>configure Build Path

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 报错解决!

点击进入Libraries tab框,点击Add Libraries

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 报错解决!

点击Server Runtime

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 报错解决!

最后先点击Apply 再点击OK

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 报错解决!

稍等片刻,报错消失了!!!

 

相关文章: