关于HttpServlet cannot be resolved to a type的解决方法

复习servlet的时候发现了的一个问题:

“HttpServlet cannot be resolved to a type”这种报错



关于这种报错的解决方法如下:

右键项目名

选择properties

选择Java Build Path

选择Add External JARs

然后在自己电脑中找到servlet-api.jar


最后apply--->ok

问题就解决了


猜你喜欢

转载自blog.csdn.net/lm_0921_miaodameng/article/details/80495986