The import javax.servlet cannot be resolved

导入以前的 web项目,项目有红叉,打开相关类,点击红叉提示:The import javax.servlet cannot be resolved

解决方式

1、首先保证,开发工具配置了 tomact 路径

java服务器开发:4、环境搭建,MyEclipse配置tomact步骤详解

2、添加库

右击项目,Build Path->configure build path->Libraries->Add Library

The import javax.servlet cannot be resolved

The import javax.servlet cannot be resolved