出现The import javax.servlet cannot be resolved 的解决方法

一、出现The import javax.servlet cannot be resolved 的解决方法
网上提供的方法是,在Eclipse中,右击项目,选择Build Path->configure build path->Libraries->Add External JARs,找到你计算机中tomcat的解压路径,在lib文件夹下选中"servlet-api.jar",添加点击“确定”
二、Description Resource Path Location Type Java compiler level does not match the version of the insta
在项目上右键Properties-》Project Facets,在打开的Project Facets页面中的Java下拉列表中,选择相应版本。
有可能是java1.6 改成java6之类的
三、找不到HttpServlet
出现The import javax.servlet cannot be resolved 的解决方法