The superclass “javax.servlet.http.HttpServlet “ was not found on the Java Buile path解决方法

法一

这个包在Tomcat下的libs文件夹内 ,需要
右键项目 ===> Build path = ==>Add library ===> 添加 Server Runtime
===> 选择适合自己版本的Tomcat ===> 找到servlet-api.jar

法二

选择调整target Runtime
右键项目 ===> properties ===>Targeted Runtimes ===>勾选tomcat 并finish

猜你喜欢

转载自blog.csdn.net/qq_45596525/article/details/107324108
今日推荐