项目导入之后报错:The import javax.servlet cannot be resolved

时间:2024-01-10 18:24:26

  项目导入之后报错: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",添加点击“确定”

    项目导入之后报错:The import javax.servlet cannot be resolved

 

完成之后如下图所示:

    项目导入之后报错:The import javax.servlet cannot be resolved