Fork me on GitHub

HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

HttpServletRequest cannot be resolved to a type


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

解决办法:

这是因为项目中缺少两个包 Jsp-api与servlet-api 包  在tomcat的安装文件中可以找到,导入到项目中即可:

在项目的中导入tomcat中的这两个包

 

如果还报错误那可能是项目中没有导入jdk包 导入即可解决

 

posted @ 2018-12-02 21:48  粥里有勺糖  阅读(370)  评论(0编辑  收藏  举报