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

用Eclipse创建了一个maven web程序,使用tomcat8.5作为服务器,可以正常启动,但是却报如下错误

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

网上查找相关资料发现是忘记在properties-java build path--library中配置server runtime--tomcat了。

操作步骤Add Library-Server Runtime--选择自己新增的tomcat服务器,完成即可。

这一步需在创建了tomcat server之后才可以进行。

 

posted @ 2017-08-01 11:26  minxinfeng  阅读(277)  评论(0编辑  收藏  举报